Function mrpt::img::camera_geometry::projectPoints_with_distortion(const std::vector<mrpt::math::TPoint3D>&, const mrpt::math::TPose3D&, const mrpt::img::TCamera&, std::vector<mrpt::img::TPixelCoordf>&, bool)
Defined in File camera_geometry.h
Function Documentation
-
void mrpt::img::camera_geometry::projectPoints_with_distortion(const std::vector<mrpt::math::TPoint3D> &points3D, const mrpt::math::TPose3D &cameraPose, const mrpt::img::TCamera &cameraParams, std::vector<mrpt::img::TPixelCoordf> &projectedPoints, bool acceptPointsBehind = false)
Project 3D points to image plane with lens distortion.
Applies the full camera model:
Transform point to camera frame: P_cam = cameraPose^{-1} * P_world
Normalize: (x,y) = (X/Z, Y/Z)
Apply distortion: (x_d, y_d) = distort(x, y)
Project to pixels: (u,v) = (f_x*x_d + c_x, f_y*y_d + c_y)
See also
- Parameters:
points3D – [IN] 3D points in world coordinates (meters)
cameraPose – [IN] Camera pose in world coordinates
cameraParams – [IN] Complete camera model (intrinsics + distortion)
projectedPoints – [OUT] Projected pixel coordinates (resized automatically)
acceptPointsBehind – [IN] If false, points with Z≤0 are marked as (-1,-1)