From: Alex Schmidt Date: Fri, 11 Oct 2013 10:55:42 +0000 (+0200) Subject: ... X-Git-Url: http://git.treefish.org/~alex/stickletrack.git/commitdiff_plain/9f9e04b576a579d96e339cb2339a71f4405af50b?ds=sidebyside;hp=e81c69eea555724e25ea911c274a1fa996363d4c ... --- diff --git a/stickletrack.cpp b/stickletrack.cpp index c5c8504..7022276 100755 --- a/stickletrack.cpp +++ b/stickletrack.cpp @@ -373,6 +373,15 @@ int process(VideoCapture& capture) { 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*[BACKSECONDS*Props.fps];