OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Fri, 17 Apr 2020 13:39:17 -0500triangulatePoints and undistortPointshttp://answers.opencv.org/question/229148/triangulatepoints-and-undistortpoints/I need some help in understanding these two functions. So afaik, triangulatePoints takes in a pair of 2D Pixel coordinates from calibrated images, and returns the triangulated point in homogeneous coordinates. I know in general what homogenous coordinates are but I'm confused about the 4th element in the output, what does this scale factor refer to? After we divide all the coordinates by this last element this is supposed to be in euclidean coordinates, but what is the origin for this euclidean coordinate system? Is it the left camera which is usually taken as the origin in stereoCalibrate?
Also, what are the units of the coordinate system, is it the size of the checkerboard square?
In addition, I also do not understand why we need to undistortPoints and what does undistortPoints exactly give us. I am hoping to find all my answers here because I am unable to understand properly anything from similar questions asked on stack overflow regarding these functions and the documentation isn't very informative PyNinjaFri, 17 Apr 2020 13:39:17 -0500http://answers.opencv.org/question/229148/Why do we pass R and P to undistortPoints() fcn (calib3d module)?http://answers.opencv.org/question/57314/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())tahaWed, 11 Mar 2015 22:47:17 -0500http://answers.opencv.org/question/57314/