i have a little problem according "displaying a video with opencv". The code is written in c++ with visual studio 2008.
here is the code:
int main( int argc, char** argv )
{
cvNamedWindow( "xample2", CV_WINDOW_AUTOSIZE );
CvCapture* capture = cvCreateFileCapture( "Micro-dance_2_.avi" );
IplImage* frame;
while(1) {
frame = cvQueryFrame( capture );
if( !frame ) break;
cvShowImage( "xample2", frame );
char c = cvWaitKey(33);
if( c == 27 ) break;
}
cvReleaseCapture( &capture );
cvDestroyWindow( "xample2" );
}
when debugging, the programm launches and i can see the command window and a grey window (wher the video should be displayed i suppose) for a few milliseconds. Then both windows close.
the output from debug window in visual shows the following:
.. . (a lot of loaded and unloaded dlls) . . .
The program '[3684] 2aufg4).exe: Native' has exited with code 0 (0x0).
i dont know what i am doing wrong...
i would appreciate your help a lot!
as allways thank you guys