Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualblueshogun96

Posted 06 March 2013 - 04:04 PM

Yes!  OpenGL can receive data from OpenCV that you can use to draw to a dynamic OpenGL texture!  It just so happens that I'm doing something similar (using OpenGL and OpenCV in a project, but using dual windows on MacOSX).  If you are storing your OpenCV image data in an IplImage structure, you can write IplImage::imageData to your texture (assuming you've created it already) using glTexSubImage2D.  Keep in mind that the pixel format is BGR, so you want to use GL_BGR_EXT.

 

This should do the trick.  If it's not what you need, sorry if I misinterpreted what you were asking for.  Either way, let me know and I'll try to come up with a different solution if that's what you need. smile.png

 

Shogun.


#1blueshogun96

Posted 06 March 2013 - 04:02 PM

Yes!  OpenGL can receive data from OpenCV that you can use to draw to a dynamic OpenGL texture!  It just so happens that I'm doing something similar (using OpenGL and OpenCV in a project, but using dual windows).  If you are storing your OpenCV image data in an IplImage structure, you can write IplImage::imageData to your texture (assuming you've created it already) using glTexSubImage2D.  Keep in mind that the pixel format is BGR, so you want to use GL_BGR_EXT.

 

This should do the trick.  If it's not what you need, sorry if I misinterpreted what you were asking for.  Either way, let me know and I'll try to come up with a different solution if that's what you need. smile.png

 

Shogun.


PARTNERS