Props.totframes = capture.get(CV_CAP_PROP_FRAME_COUNT);
Props.diagonal = sqrt( pow(Props.width, 2) + pow(Props.height, 2) );
+ if ( Props.width == 0 || Props.height == 0 || Props.fps == 0 || Props.totframes == 0 ) {
+ cerr << "Something got wrong while reading video-file info!" << endl;
+ cerr << "Width: " << Props.width << endl;
+ cerr << "Height: " << Props.height << endl;
+ cerr << "FPS: " << Props.fps << endl;
+ cerr << "Total frames: " << Props.totframes << endl;
+ exit(1);
+ }
+
Mat frameintime[BACKSECONDS*Props.fps];
tagintime = new vector<tag>*[BACKSECONDS*Props.fps];