Advertisement Jump to content
Sign in to follow this  
jenny_wui

OpenGL OpenGL and OpenCV matrix

This topic is 1784 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I am working on rotation matrix in OpenCV. I need to use it for OpenGL. Do I need to transpose the matrix in OpenCV in order to use for OpenGL? Does this matter for rotation matrix. Please clarify my question. Thanks.

Share this post


Link to post
Share on other sites
Advertisement

I'm guessing you're not a native english speaker..

 

Your question is a bit unclear. Please elaborate on exactly what you're trying to do, with some relevant code pasted.

 

Haven't used OpenCV myself, but basically this will boil down to inspecting and understanding the data.

 

Basically, print out the literal values from OpenCV to see with your own eyes... Then compare them to how a GL rotation matrix is constructed.

 

https://www.opengl.org/sdk/docs/man2/xhtml/glRotate.xml

 

Then either transpose it, shift around the values appropriately, or reconstruct it entirely.

Share this post


Link to post
Share on other sites

Didn't even know what OpenCV was until now. These googled example references may help you perform what has been suggested (i.e. The kind of things that would result from suggestions like the one from 3TATUK2):

 

http://stackoverflow.com/questions/9081900/reference-coordinate-system-changes-between-opencv-opengl-and-android-sensor?lq=1

 

http://stackoverflow.com/questions/3712049/how-to-use-an-opencv-rotation-and-translation-vector-with-opengl-es-in-android

Edited by steven katic

Share this post


Link to post
Share on other sites

Try it? This sounds like the thing you'll have to code anyway except for a "transpose()" call somewhere.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!