Difference between undistortPoints() and projectPoints() in OpenCV

霸气de小男生 提交于 2019-12-06 15:58:46

Quote from the 3.2 documentation for projectPoints():

Projects 3D points to an image plane.

The function computes projections of 3D points to the image plane given intrinsic and extrinsic camera parameters.

You have the parameter distCoeffs:

If the vector is empty, the zero distortion coefficients are assumed.

With no distorsion the equation is:

With K the intrinsic matrix and [R | t] the extrinsic matrix or the transformation that transforms a point in the object or world frame to the camera frame.


For undistortPoints(), you have the parameter R:

Rectification transformation in the object space (3x3 matrix). R1 or R2 computed by cv::stereoRectify can be passed here. If the matrix is empty, the identity transformation is used.

The reverse transformation is the operation where you compute for a 2D image point ([u, v]) the corresponding 3D point in the normalized camera frame ([x, y, z=1]) using the intrinsic parameters.

With the extrinsic matrix, you can get the point in the camera frame:

The normalized camera frame is obtained by dividing by the depth:

Assuming no distortion, the image point is:

And the "reverse transformation" assuming no distortion:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!