Convert OpenGL Texture to Matrix OpenCV

Is there a way to convert OpenGL GLuint textureto OpenCV cv::Mat?

+5
source share
1 answer

You might want to take a look at this question that asks about converting from glReadPixelsto cv::Mat, which is exactly the same problem when used glGetTexImageinstead glReadPixels.

My answer to this question explains how to directly read texture data into the repository cv::Matwith all possible traps (e.g. filling, color sorting, ...).

+6
source

All Articles