Ask Your Question

Revision history [back]

Read and Display RGB video file using opencv2.2

Hey Guys, I have an Uncompressed RGB video file. The extension is (.rgb)

I am not able to read and display the video. I am not able to even grab the frame .

int main( int argc, char* argv ) { cvNamedWindow( “Example2”, CV_WINDOW_AUTOSIZE ); 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” ); }

Read and Display RGB video file using opencv2.2

Hey Guys, I have an Uncompressed RGB video file. The extension is (.rgb)

I am not able to read and display the video. I am not able to even grab the frame .

int main( int argc, char* argv ) {

cvNamedWindow( “Example2”, CV_WINDOW_AUTOSIZE );
CvCapture CvCapture* capture = cvCreateFileCapture( argv[1] "test.rgb" );
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” );
}