Jump to content

  • Log In with Google      Sign In   
  • Create Account

OpenGL and OpenCV matrix


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 jenny_wui   Members   -  Reputation: 196

Like
0Likes
Like

Posted 05 March 2014 - 07:57 PM

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.



Sponsor:

#2 3TATUK2   Members   -  Reputation: 730

Like
0Likes
Like

Posted 05 March 2014 - 09:36 PM

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.



#3 steven katic   Members   -  Reputation: 275

Like
0Likes
Like

Posted 06 March 2014 - 02:27 AM

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, 06 March 2014 - 02:34 AM.


#4 TheChubu   Crossbones+   -  Reputation: 5213

Like
0Likes
Like

Posted 06 March 2014 - 05:51 AM

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


"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS