Ask Your Question
1

3d point reconstruction

asked May 17 '14

GiulSDU gravatar image

Hi, i have two 2d points from two rectified images, they match. How can i now compute the 3d point? I have both projection matrix. thank you

Preview: (hide)

Comments

1
  • if you have a stereo-rig, and did stereocalibration, you can build disparity via blockmatching, and use reprojectimageto3d

  • if you don't have a Q-matrix, you will need more than 2 images, and use triangulation

berak gravatar imageberak (May 17 '14)edit

1 answer

Sort by » oldest newest most voted
4

answered May 17 '14

You could use cv::triangulatePoints:

http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#triangulatepoints

It gives you homogeneous 3D points from two projection matrices and corresponding pixels.

Preview: (hide)

Comments

that works fine thanks!! i tried to crop the original images a little bit and to use the same matching algorithm as before..the problem is that i get very different 3d-points coordinates...but the object is just the same....and i did not change the position..i just cropped the image..aren t i suppose to get the same 3d point regardless to the xy coordinate of the object in the image? can you see the error somewhere? thank you

GiulSDU gravatar imageGiulSDU (May 18 '14)edit

Question Tools

Stats

Asked: May 17 '14

Seen: 663 times

Last updated: May 17 '14