Reference coordinate system changes between OpenCV, OpenGL and Android Sensor
If you look at the picture, then you see, that the both coordinate systems have the same handednes, but the OpenCV one is rotated by pi around the x axis. This can be represented by the following rotation matrix:
1 0 0
0 -1 0
0 0 -1
Related videos on Youtube
Jav_Rock
I am a Telecommunication Engineer with experience in signal processing programming, computer vision, software architecture and software integration. I enjoy solving engineering problems, developing new methods and learning the latest programming solutions.
Updated on June 04, 2022Comments
-
Jav_Rock almost 2 years
I am working with OpenCV, Android and OpenGL for an Augmented Reality project. As far as I know the coordintate system in OpenGL is
The OpenCV coordinate system is:
When combining these devices with android sensors how can I do the coordinate system conversions and [R|t] matrix conversion? Is there a good tutorial or documentation were all of this conffusing stuff is explained?
-
Jav_Rock over 12 yearsYes, for changing between openCV and OpenGL an inversion about y and z axis is needed. The biggest problem comes with android sensors...
-
Stefan almost 11 yearsIt is not a rotation. The coordinate system (y-axis) is flipped at the x-axis. The z-axis is unaffected.
-
datenwolf almost 11 years@Stefan: Look again: In the pictures OP pasted into his answer the Z axis has been flipped, too. According to those pictures (OpenGL Z axis comes out of the screen, OpenCV Z axis goes into the screen) it's a rotation by 180° along the X axis.