47 const std::vector<mrpt::math::TPoint3D>& in_points_3D,
50 std::vector<mrpt::img::TPixelCoordf>& projectedPoints,
51 bool accept_points_behind =
false);
62 template <
bool INVERSE_CAM_POSE>
75 cam_params.
cx() + cam_params.
fx() * x / z,
76 cam_params.
cy() + cam_params.
fy() * y / z);
80 template <
typename POINT>
85 ASSERT_(in_point_wrt_cam.z != 0);
87 out_projectedPoints.
x = cam_params.
cx() + cam_params.
fx() *
90 out_projectedPoints.
y = cam_params.
cy() + cam_params.
fy() *
118 const std::vector<mrpt::math::TPoint3D>& in_points_3D,
121 const std::vector<double>& distortionParams,
122 std::vector<mrpt::img::TPixelCoordf>& projectedPoints,
123 bool accept_points_behind =
false);
146 bool accept_points_behind =
false);
150 const std::vector<mrpt::math::TPoint3D>& P,
153 std::vector<mrpt::img::TPixelCoordf>& pixels,
154 bool accept_points_behind =
false);
169 const std::vector<mrpt::img::TPixelCoordf>& srcDistortedPixels,
170 std::vector<mrpt::img::TPixelCoordf>& dstUndistortedPixels,
172 const std::vector<double>& distortionParams);
184 const std::vector<mrpt::img::TPixelCoordf>& srcDistortedPixels,
185 std::vector<mrpt::img::TPixelCoordf>& dstUndistortedPixels,
void projectPoint_with_distortion(const mrpt::math::TPoint3D &in_point_wrt_cam, const mrpt::img::TCamera &in_cam_params, mrpt::img::TPixelCoordf &out_projectedPoints, bool accept_points_behind=false)
Project one 3D point into a camera using its calibration matrix and distortion parameters (radial and...
double fx() const
Get the value of the focal length x-value (in pixels).
void inverseComposePoint(const double gx, const double gy, const double gz, double &lx, double &ly, double &lz, mrpt::optional_ref< mrpt::math::CMatrixDouble33 > out_jacobian_df_dpoint=std::nullopt, mrpt::optional_ref< mrpt::math::CMatrixDouble36 > out_jacobian_df_dpose=std::nullopt, mrpt::optional_ref< mrpt::math::CMatrixDouble36 > out_jacobian_df_dse3=std::nullopt) const
Computes the 3D point L such as .
double fy() const
Get the value of the focal length y-value (in pixels).
mrpt::vision::TStereoCalibParams params
A pair (x,y) of pixel coordinates (subpixel resolution).
#define ASSERT_(f)
Defines an assertion mechanism.
double cy() const
Get the value of the principal point y-coordinate (in pixels).
Parameters for the Brown-Conrady camera lens distortion model.
A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,qz).
void projectPoints_with_distortion(const std::vector< mrpt::math::TPoint3D > &in_points_3D, const mrpt::poses::CPose3D &cameraPose, const mrpt::math::CMatrixDouble33 &intrinsicParams, const std::vector< double > &distortionParams, std::vector< mrpt::img::TPixelCoordf > &projectedPoints, bool accept_points_behind=false)
Project a set of 3D points into a camera at an arbitrary 6D pose using its calibration matrix and dis...
void undistort_point(const mrpt::img::TPixelCoordf &inPt, mrpt::img::TPixelCoordf &outPt, const mrpt::img::TCamera &cameraModel)
Undistort one point given by its pixel coordinates and the camera parameters.
double cx() const
Get the value of the principal point x-coordinate (in pixels).
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void undistort_points(const std::vector< mrpt::img::TPixelCoordf > &srcDistortedPixels, std::vector< mrpt::img::TPixelCoordf > &dstUndistortedPixels, const mrpt::math::CMatrixDouble33 &intrinsicParams, const std::vector< double > &distortionParams)
Undistort a list of points given by their pixel coordinates, provided the camera matrix and distortio...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
mrpt::img::TPixelCoordf projectPoint_no_distortion(const mrpt::img::TCamera &cam_params, const mrpt::poses::CPose3D &F, const mrpt::math::TPoint3D &P)
Project a single 3D point with global coordinates P into a camera at pose F, without distortion param...
void projectPoints_no_distortion(const std::vector< mrpt::math::TPoint3D > &in_points_3D, const mrpt::poses::CPose3D &cameraPose, const mrpt::math::CMatrixDouble33 &intrinsicParams, std::vector< mrpt::img::TPixelCoordf > &projectedPoints, bool accept_points_behind=false)
Project a set of 3D points into a camera at an arbitrary 6D pose using its calibration matrix (undist...
void composePoint(double lx, double ly, double lz, double &gx, double &gy, double &gz, mrpt::optional_ref< mrpt::math::CMatrixDouble33 > out_jacobian_df_dpoint=std::nullopt, mrpt::optional_ref< mrpt::math::CMatrixDouble36 > out_jacobian_df_dpose=std::nullopt, mrpt::optional_ref< mrpt::math::CMatrixDouble36 > out_jacobian_df_dse3=std::nullopt, bool use_small_rot_approx=false) const
An alternative, slightly more efficient way of doing with G and L being 3D points and P this 6D pose...