32 return cv::Point2d(
fx * p[0] / p[2] +
cx,
fy * p[1] / p[2] +
cy);
38 if (std::abs(d[2]) < 1e-12)
42 const double s = (z -
position[2]) / d[2];
53 const cv::Matx33d inverseK(1.0 /
fx, 0.0, -
cx /
fx, 0.0, 1.0 /
fy, -
cy /
fy, 0.0, 0.0, 1.0);
55 const cv::Matx33d toPlane(h, 0.0,
position[0], 0.0, h,
position[1], 0.0, 0.0, 1.0);
56 return toPlane *
rotation * inverseK;
std::optional< cv::Vec3d > pixelToPlane(double u, double v, double z) const
cv::Matx33d imageToPlaneHomography(double z) const
cv::Vec3d rayDirection(double u, double v) const
std::optional< cv::Point2d > project(const cv::Vec3d &point) const