Skip to main content
GameDev.net gamedev.net
🔒 Locked

Interface from OpenGL to OpenCV

Started by CMuYu Apr 17, 2013 at 1:53 AM 4 replies 3.6k views
Original Post
CMuYu
CMuYu

Hi, everyone.
I wanted to process a image by OpenCV. It's generated by OpenGL. Firstly, I saved this image in my hard disk and read it with OpenCv, but I found it inefficient.
So I want to find an interface from OpenGL to OpenCV so that I don't need to save the image to my hard disk.

The function "load3dDataToGL" is not what I want. I just want to load image from OpenGL. :(

Thanks everyone!

CMuYu
CMuYu

Anyone to answer me?

CMuYu
CMuYu

Can anyone tell me a way? :(

CableGuy
CableGuy

I guess you can use glGetTexImage to get the texture data and then create an appropriate OpenCV matrix and point it to the data retrieved from OpenGL.

CMuYu
CMuYu

I guess you can use glGetTexImage to get the texture data and then create an appropriate OpenCV matrix and point it to the data retrieved from OpenGL.

Thank you. I will try it.

CMuYu
CMuYu

Do you have another ways? Thank you?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.