Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

probably easier, to retrieve the pixels from the opengl context, than from the highgui window:

Mat screen(h,w,CV_8UC3);
glReadPixels (0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, screen.data);

probably easier, to retrieve the pixels from the opengl context, than from the highgui window:

Mat screen(h,w,CV_8UC3);
glReadPixels (0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, screen.data);

(i'm not sure, but w might need to be a multiple of 4 for this)