Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why do we pass R and P to undistortPoints() fcn (calib3d module)?

I have two AVT Manta G125B cameras. I made individual calibrations of the cameras, and then stereo calibration. I am trying to triangulate a point of interest in real-time. I noticed that triangulatePoints() function of calib3d module accepts undistorted image point coordinates as input so I need to use undistortPoints() function to obtain ideal point coordinates. As far as I know, it must be sufficient to pass only cameraMatrix and distCoeffs parameters to undistortPoints. By finding nonlinear least squares solution, undistortPoints() must provide solution. I did not understand why we need to pass R and P (obtained with stereoRectify() fcn) to undistortPoints.

void undistortPoints(InputArray src, OutputArray dst, InputArray cameraMatrix, InputArray distCoeffs, InputArray R=noArray(), InputArray P=noArray())