Ask Your Question
1

triangulatePoints() function

asked 2015-05-27 02:09:21 -0600

taha gravatar image

I don't understand what exactly projPoints1 and projPoints2 are in triangulatePoints() built-in function of calib3d module. Here is the C++ API of triangulatePoints():

void triangulatePoints(InputArray projMatr1, InputArray projMatr2, InputArray projPoints1, InputArray projPoints2, OutputArray points4D)

When a point is detected in left and right images, do we have to use undistortPoints() function of imgproc module in order to obtain collinear points and then send the results to triangulatePoints() as projPoints1 and projPoints2? OR is it the right way to send detected 2D image point (including lens distortions) directly to triangulatePoints()? In OpenCV documentation of triangulatePoints() it just says

projPoints1 – 2xN array of feature points in the first image projPoints2 – 2xN array of feature points in the second image

where N is number of features. MATLAB Computer Vision Toolbox has a similar triangulation function, and before using triangulate function in there, they undistort detected feature coordinates. See this example:

http://www.mathworks.com/help/vision/...

They have a warning in this page:

The triangulate function does not account for lens distortion. You can undistort the images using the undistortImage function before detecting the points. Alternatively, you can undistort the points themselves using the undistortPoints function.

I wonder if it is the same in OpenCV too or not. I would be happiest person in the world if someone can respond.

edit retag flag offensive close merge delete

Comments

I am also fighting with this! Did you have any luck sorting it out?

stillNovice gravatar imagestillNovice ( 2015-06-12 03:32:12 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2015-10-01 07:50:59 -0600

acajic gravatar image

updated 2015-10-01 07:51:17 -0600

To the best of my knowledge the projPoints1 and projPoints2 need to be undistorted before being passed to triangulatePoints().

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-05-27 02:09:21 -0600

Seen: 3,969 times

Last updated: Oct 01 '15