Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

determine object pose

Dear programmers,

 

I have been dealing with the issue of determining the pose of an object following the: http://zone.ni.com/reference/en-XX/help/372916M-01/nivisionconcepts/spatial_calibration_indepth/

 

I have calibrated my system and tried to determine the Rotational matrix and Translation vector following the documentation (please see the attachments below saved for LV2011).

 

I have also calibrated my system with Matlab calibration toolbox and the focal distances and optical centers are basically the same. But the calculated Rotational matrix and Translation vector are correct in Matlab, but incorrect in Labview.

 

Could someone with more experiences pleas helpe me to understand what am I doing wrong?

 

Best regards,

K

 

 

 


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Download All
0 Kudos
Message 1 of 7
(4,048 Views)

Dear Klemen,

 

I'm sorry for the late reply.

 

I checked your code, and the results as well.

For me the code looks fine.

If I calculate M*W => H will be the result. 

For this I used an external tool as well:http://www.bluebit.gr/matrix-calculator/matrix_multiplication.aspx

 

You constructed Camera matrix also well.

 

How big is the difference in the result? Did you use the same picture in your Matlab program as well?

 

Is the issue still present?

 

Best regards,

CLA, CLED
0 Kudos
Message 2 of 7
(3,964 Views)

Dear BalazsNagy,

 

I am not worried about the actual calculation (matrix multiplication). I know this is correct.

 

I am only concerned about the results of the translation vector and rotation matrix. The actual setup is shown on the first image HERE. Also in the background, two calibration grids are visible. The first is the cheesboard pattern (Matlab), the second is the dot pattern (Labview). During the calibration, both were placed on the white flat surface (where the laser-line is projected).

 

1. The results from Matlab (mm):

 

Translation vector

 

-84.665374 -67.225807 384.071521

Rotational matrix

0.003979 0.999874 0.015387
0.858000 0.004490 -0.513631
-0.513635 0.015246 -0.857873

 

2. The results from Labview as shown in the code of the first post (mm):

 

Translation vector

 

-0.527169 -0.350871 0.940925

Rotational matrix

rot matrix

 

 

It can be seen that the results differ a lot. I belive the results in Matlab are correct, since the translation vector is more meaningful (with respect to the setup).

 

Best regards,

K

 


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 3 of 7
(3,950 Views)

Dear Klemen,

 

Sorry for the late reply.

 

I searched a lot or similar projects, like yours, and found one, where the point was also to to make up a relationship between pixel coordinates and  absolute coordinates by using the Homography matrix.

https://decibel.ni.com/content/docs/DOC-16527

The LV code of the project is also attached.

I hope it will be useful, and will help in your project.

 

BR,

CLA, CLED
Message 4 of 7
(3,933 Views)

Dear Balazs Nagy,

 

than you very much for your effort. I had a quick look at the code, but it is really fragmented and strangely coded (compared to my coding - maybe mine is messed up 🙂 ).

 

I will take a more thourough look!

 

Thank you again and best regards,


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 5 of 7
(3,916 Views)

Hi Klemen,

 

Thank you for posting this info!

Did you manage to extract the translation and rotation information from LabVIEW calibration at the end? 

I tried calculating this matrixes and got the same meaningless result. Could it be this number are just scaled somehow and I need to multiply it by some number, e.g. estimated height?

Thanks,

Nikita.

Nikita Prorekhin
CLA
0 Kudos
Message 6 of 7
(2,959 Views)

Hello,

 

no I still could not get meaningful results.

Only looking at the translation vector after the calibration, the results are way off.

 

If you are able to find out anything new, please do share.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 7 of 7
(2,871 Views)