opencv test
This commit is contained in:
@@ -96,9 +96,11 @@ void Rubiks::run() {
|
||||
|
||||
long screenBufferSize = rowStride * 1080;
|
||||
|
||||
cv::Mat f(1080, 1920, CV_8UC3);
|
||||
uint8_t buf[screenBufferSize];
|
||||
glReadPixels(0, 0, 1920, 1080, GL_BGR, GL_UNSIGNED_BYTE, buf);
|
||||
|
||||
cv::Mat f(1080, 1920, CV_8UC4, buf, rowStride);
|
||||
|
||||
glReadPixels(0, 0, 1920, 1080, GL_BGR, GL_UNSIGNED_BYTE, f.data);
|
||||
/*cv::Mat cv_pixels( 1080, 1920, CV_8UC3 );
|
||||
|
||||
for( int y=0; y<1080; y++ ) for( int x=0; x<1920; x++ ) {
|
||||
|
||||
Reference in New Issue
Block a user