Mercurial Hosting > traffic-intelligence
comparison c/feature-based-tracking.cpp @ 1223:051cf5bddc1f
work on optimization (improved for feature tracking)
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 21 Jun 2023 23:57:54 -0400 |
parents | 164dab203037 |
children |
comparison
equal
deleted
inserted
replaced
1222:69b531c7a061 | 1223:051cf5bddc1f |
---|---|
96 exit(0); | 96 exit(0); |
97 } | 97 } |
98 | 98 |
99 VideoCapture capture(::getRelativeFilename(params.parentDirname, params.videoFilename)); | 99 VideoCapture capture(::getRelativeFilename(params.parentDirname, params.videoFilename)); |
100 if(!capture.isOpened()) { | 100 if(!capture.isOpened()) { |
101 cout << "Video filename " << params.videoFilename << " could not be opened. Exiting." << endl; | 101 cout << "Video filename " << params.videoFilename << " could not be opened (check filename first). Exiting." << endl; |
102 exit(0); | 102 exit(0); |
103 } | 103 } |
104 | 104 |
105 Size videoSize = Size(capture.get(CAP_PROP_FRAME_WIDTH), capture.get(CAP_PROP_FRAME_HEIGHT)); | 105 Size videoSize = Size(capture.get(CAP_PROP_FRAME_WIDTH), capture.get(CAP_PROP_FRAME_HEIGHT)); |
106 unsigned int nFrames = capture.get(CAP_PROP_FRAME_COUNT); | 106 unsigned int nFrames = capture.get(CAP_PROP_FRAME_COUNT); |