Ask Your Question
0

Interpret results from triangulatePoints

asked 2016-10-13 09:10:36 -0600

benT gravatar image

updated 2016-10-19 06:05:07 -0600

Hi, I am detecting ArUco Markers with a stereo setup and would like to know the 3d coordinates of the corners. I am using triangulatePoints to achieve that (the rig is fully calibrated and I am calling undistortPoints before triangulating), but I do not understand how to interpret the results. Here is an example: left image right image

As you can see the markers are detected fine. The results of triangulatePoints are the following:

0.247877    0.0300715   0.501093
0.254448    0.0923606   0.518614
0.181621    0.0959466   0.508083
0.176167    0.0358917   0.50486

0.00881887  0.0501222   0.502481
0.00898725  0.00313973  0.520062
0.0636986   -0.00419561 0.526967
0.0654933   0.0450242   0.509843

0.166304    -0.163573   0.579394
0.225936    -0.172218   0.58141
0.230371    -0.112224   0.581557
0.170264    -0.104482   0.576754

0.0295858   -0.132247   0.574503
0.0318483   -0.16779    0.591691
0.0783909   -0.178207   0.602229
0.0787127   -0.13994    0.583072

0.151794    -0.236149   0.629165
0.102628    -0.229509   0.624732
0.0989285   -0.286064   0.634169
0.151599    -0.29231    0.637837

I tried to plot these in Matlab, and the result looks good: Matlab plot

But I just cannot find any relations to the cameras position. I would like to have coordinates somehow relative to one of the cameras, so that the camera is the origin of the used coordinate system. How can I do that? I read that the origin is the optical center of the first camera, but then my x-values should not be all-positive, right?

edit retag flag offensive close merge delete

Comments

I pursued this further and got some better calibration results by changing the flags, but I still cannot make use of the 3D points. These are some points I got now:

-0.690238,-0.00865336,4.65332
-0.689055,-0.0313384,4.73423
-0.590603,-0.032659,4.71197
-0.577273,-0.00983878,4.55798
-0.344723,-0.0384947,4.87473
-0.308808,-0.01425,4.63703
-0.400845,-0.0102108,4.51042
-0.461785,-0.0360666,5.00114
-0.632265,-0.0532444,5.08179
-0.625435,-0.0747179,5.22209
-0.513459,-0.0707198,5.08731
-0.522259,-0.0497474,4.95771
-0.324495,-0.129582,5.23564
-0.26663,-0.113431,5.37707
-0.346018,-0.0962815,5.49725
-0.403254,-0.111857,5.33635
benT gravatar imagebenT ( 2016-10-18 11:20:51 -0600 )edit

I updated the question with newer results and the plots, so please disregard the last two comments

benT gravatar imagebenT ( 2016-10-19 05:20:28 -0600 )edit

Does anybody have an idea?

benT gravatar imagebenT ( 2016-11-01 05:53:15 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-11-03 08:04:38 -0600

benT gravatar image

triangulatePoints returns 4 values per point. The first 3 are the coordinates of the point, but they all have to be divided by the fourth value. The coordinate system originates in the optical center of the first camera (left) with the x-axis pointing to the right, the y-axis pointing downwards (!) and the z-axis pointing away from the camera like this:

image description

The units are the ones used during the calibration. For example I used a square size of 0.07m, so the results will be in meters as well.

edit flag offensive delete link more

Comments

Thanks for the update.

Eduardo gravatar imageEduardo ( 2016-11-03 09:58:25 -0600 )edit

I know how it feels to click on a link all excited that someone else had the same problem, only to find an old question without answer...

benT gravatar imagebenT ( 2016-11-03 10:08:02 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-10-13 09:10:36 -0600

Seen: 1,628 times

Last updated: Nov 03 '16