0

I'm currently trying to implement the triangulation algorithm proposed by Hartley and Sturm (here) and I'm having some difficulties. I think I understand the idea behind it, but I'm not sure how to parameterize the pencil of epipolar lines.

Given two images, and the estimated fundamental matrix between them, how can I:

1) Find the epipole coordinates in both images?

2) Transform the images so that each desired point is in the origin and the epipole is in one of the axis?

3) Calculate the new fundamental matrix which has a special form (see paper page 5)?

Afterwards, I think I can find the distance polynomial and minimize it, but these steps are the ones holding me back.

I'm using OpenCV and some example code would be great :)

zync
  • 463
  • 3
  • 17
  • 1
    openCV's triangulatePoints function does a nice work. I use it for a application where i need VERY HIGH precission, at it works really nice. Check this -> http://stackoverflow.com/questions/16295551/how-to-correctly-use-cvtriangulatepoints – Ander Biguri May 15 '13 at 10:37
  • Thank you for your comment. I'm trying to minimize the error in the images. From what you said in the post, the function uses least squares method which minimizes a value which "has no geometric meaning" (said in the paper I mentioned). How good are the results you get? How do you get or test the rotation and translation matrices? – zync May 15 '13 at 11:11
  • My method needs precision on the 3rd decimal at least, and I get it. in my case that means micrometrical precission (of course depends on the calibration). I get the rotation and translation matrices by calibrating my stereo system before the capture of images, there is a function in opeCV to get them: cv::stereocalibrate(). With a properly calibrated stereo system you can easily get the points from pixels to XYZ coordinates using cv::triangulatePoints() – Ander Biguri May 15 '13 at 14:10
  • Sorry I didn't mention. I'm not using a stereo rig. I'm using one hand-held camera and I can only obtain the intrinsic parameters K. Afterwards, I compute the Fundamental Matrix and the Essential Matrix, which I decompose with SVD to get the position and rotation. Then, I can compute a projection matrix. – zync May 15 '13 at 14:44
  • So there you have everything! good luck – Ander Biguri May 16 '13 at 08:23

0 Answers0