cv::TriangulatePoints drifting for points from same pose

asked 2015-08-23 18:41:56 -0500

saihv gravatar image

updated 2015-08-23 22:22:24 -0500

Hi, I am encountering a strange issue with the triangulation function of openCV. For my two-view pose estimation tests, I was doing this:

Case 1: A single camera taking pictures of a scene from two views, then computing the essential matrix and triangulating the scene: which worked reasonably well.

Case 2: I am trying to do this with two cameras (both calibrated), but triangulation is failing. For image pairs from the same poses, the triangulated points should be more or less the same but now, they are drifting.

Example:

t1 = [0.9950924870426178, 0.0518147862900856, -0.08429810290303305] (cam 2 at 0, 0, 0)
Homogenized feature match: (-0.1558, -0.1504, 1); (-0.0574, -0.1619, 1);
Triangulated point:  [-4.8177, -4.6760, 30.92588]

t2 = [0.9962326376676536, 0.05676863562110455, -0.08508433760191333] (approx. the same as before)
Homogenized feature match: (-0.1557, -0.1504, 1); (-0.0574, -0.1619, 1);
Triangulated point: [-2.3599, -2.3053, 15.1603]

What am I doing wrong here? For the next set of points, triangulatePoints comes up with another weird estimate.

edit retag flag offensive close merge delete