Anderson neo Anderson neo -4 years ago 190
C++ Question

init done opengl support available

I have build OpenCV 2.4.1 on Ubuntu 12.04 32 bit platform with OpenGl,Qt and OpenNI but whenever I am running example programs listed in the Learning OpenCV Book.

For Example:

#include "highgui.h"

int main( int argc, char** argv ) {
cvNamedWindow( "Example2", CV_WINDOW_AUTOSIZE );
//CvCapture* capture = cvCaptureFromAVI( argv[1] );
CvCapture* capture = cvCreateFileCapture( argv[1] );
IplImage* frame;
while(1) {
frame = cvQueryFrame( capture );
if( !frame ) break;
cvShowImage( "Example2", frame );
char c = cvWaitKey(33);
if( c == 27 ) break;
}
cvReleaseCapture( &capture );
cvDestroyWindow( "Example2" );
}


I get this message in the console:

init done
opengl support available


I wonder where I am going wrong.I am not getting any errors in compilation.

Answer Source

This is not an error. I have a similar configuration on my machine and I see these statements every time I run something. These statements have nothing to do with what you have programmed. I have run your exact code and it displayed the video without any problems. Perhaps add this error check after you open the capture to make sure it found the video:

if (!capture) {
    std::cout << "COULD NOT OPEN CAPTURE\n";
}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download