5

Is there any way to convert OpenGL's GLuint texture type to OpenCV's cv::Mat ?

1

1 Answer 1

6

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, ...).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.