Mercurial > hg > nsaunier > traffic-intelligence
comparison c/cvutils.cpp @ 11:e77e2fd69b02
modularized code (not compiling)
| author | Nicolas Saunier <nico@confins.net> |
|---|---|
| date | Wed, 11 Nov 2009 12:01:43 -0500 |
| parents | eb38637f338d |
| children | ff5403319cec |
comparison
equal
deleted
inserted
replaced
| 10:068cf45c3f1b | 11:e77e2fd69b02 |
|---|---|
| 16 exit(-1); | 16 exit(-1); |
| 17 } | 17 } |
| 18 | 18 |
| 19 return image; | 19 return image; |
| 20 } | 20 } |
| 21 | |
| 22 void goToFrameNum(CvCapture* capture, const int& currentFrameNum, const int& targetFrameNum) { | |
| 23 if (currentFrameNum > targetFrameNum) | |
| 24 cerr << "Current frame number " << currentFrameNum << " is after the target frame number " << targetFrameNum << "." << endl; | |
| 25 | |
| 26 for (int frameNum = currentFrameNum; frameNum<targetFrameNum; ++frameNum) { | |
| 27 IplImage* frame = cvQueryFrame(inputVideo); | |
| 28 if (!frame) | |
| 29 break; | |
| 30 frameNum++; | |
| 31 } | |
| 32 } |
