2

I'm trying to make a simple fully-native app which uses OpenGL-ES. Thanks to the ndk sample native-activity I was able to display a color on the screen. Now I want to display the content of a cv::Mat (capture the camera), putting it in a openGL texture.

Most of the examples involving OpenCV are using half-native app with java handling the display part. Does someone know how to create a glTexImage2D from cv::Mat in android native code ?

Thanks

ArtemStorozhuk
  • 8,715
  • 4
  • 35
  • 53
Tonial
  • 73
  • 3
  • 6
  • possible duplicate of [Loading texture for OpenGL with OpenCV](http://stackoverflow.com/questions/9126002/loading-texture-for-opengl-with-opencv) – karlphillip Jul 05 '12 at 13:01
  • or [Dynamically changing a texture in OpenGL](http://stackoverflow.com/questions/3190719/dynamically-changing-a-texture-in-opengl) – karlphillip Jul 05 '12 at 13:02
  • or [Wrong drawing with OpenCV and OpenGL](http://stackoverflow.com/questions/11130962/wrong-drawing-with-opencv-and-opengl) – karlphillip Jul 05 '12 at 13:03
  • See [this answer](http://stackoverflow.com/a/9098883/743214) for some general considerations when using OpenCV images with OpenGL. Though the question was about `glReadPixels`, the points given apply in the opposite direction, too. – Christian Rau Jul 05 '12 at 13:51

0 Answers0