1 | initial version |
And to complement my suggestion made, try this code in C++, you can already see how much easier it is :)
int main( int argc, char** argv ) {
VideoCaptuee capture ( argv[1] );
Mat frame;
for(;;){
capture >> frame;\
f( !frame )
{
printf("EMPTY OR NULL");
break;//ends HERE!!!!!
}
cvShowImage( “Example2”, frame );
char c = cvWaitKey(33);
if( c == 27 ) break;
}
cvReleaseCapture( &capture ); cvDestroyWindow( “Example2” );
}
2 | No.2 Revision |
And to complement my suggestion made, try this code in C++, you can already see how much easier it is :)
#include “highgui.h”
#include "stdio.h"
}
3 | No.3 Revision |
And to complement my suggestion made, try this code in C++, you can already see how much easier it is :)
#include “highgui.h”
#include "stdio.h"
int main( int argc, char** argv ) {
VideoCaptuee VideoCapture capture ( argv[1] );
Mat frame;
for(;;){
capture >> frame;\
f( !frame ) frame;
if ( frame.empty() ){ { cout << "No frame read from video" << endl;
break; printf("EMPTY OR NULL");
break;//ends HERE!!!!!
}
cvShowImage( “Example2”, frame );
char c = cvWaitKey(33);
if( c == 27 ) break;
imshow("Example", frame);
waitKey(0);
}
cvReleaseCapture( &capture );
cvDestroyWindow( “Example2” );
}
4 | No.4 Revision |
And to complement my suggestion made, try this code in C++, you can already see how much easier it is :)
#include “highgui.h” "opencv2/highgui/highgui.hpp"
#include "stdio.h"
int main( int argc, char** argv ) {
VideoCapture cv::VideoCaptuee capture ( argv[1] );
Mat cv::Mat frame;
for(;;){
for(;;) {
capture >> frame;
if ( if( frame.empty() ){ ) { cout << "No frame read from video" << endl;
printf("EMPTY OR NULL");
break;
break;//ends HERE!!!!!
}
imshow("Example", frame);
cv::imshow( "Example2", frame );
waitKey(0);
char c = cv::waitKey(33);
}
if( c == 27 ) break;
}
}