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?
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?
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):
-84.665374 -67.225807 384.071521
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):
-0.527169 -0.350871 0.940925
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).
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.
The LV code of the project is also attached.
I hope it will be useful, and will help in your project.
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,
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?
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.