Ask Your Question

Revision history [back]

First of all, I highly recommend using the C++ interface when using images and video's. It basically helps you with releasing resources and such. This would turn your code into something like this:

NamedWindow( “Example2”, CV_WINDOW_AUTOSIZE );
VideoCapture capture = VideoCapture( "C://absolute_link_to_video_file.rgb" );
Mat frame;
while(1) {
    frame = read( capture );
    imshow( “Example Image C++ style”, frame );
    if( !frame ) break;

More information about the functions can be used here:

Can you go and try this. Basically if this code does not work, then just place a debug point at the frame read function and see if it is throwing information back. If not, then probably the *.rgb type is not supported in OpenCV.