Is there any way to convert OpenGL's GLuint texture type to OpenCV's cv::Mat ?
You may want to take a look at this question which asks about converting from glReadPixels into a cv::Mat, which is exactly the same problem when using glGetTexImage instead of glReadPixels.
My answer to this question explains how to directly read the texture data into the cv::Mat's storage with all possible pitfalls (like padding, color ordering, ...).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With