Mercurial Hosting > traffic-intelligence
diff c/cvutils.cpp @ 407:5eeb3b9fb568
commented problem code (opencv 2.4.6)
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 12 Aug 2013 22:50:42 -0400 |
parents | 0089fb29cd26 |
children | 1e3c7fe21a38 |
line wrap: on
line diff
--- a/c/cvutils.cpp Wed Aug 07 11:42:34 2013 -0400 +++ b/c/cvutils.cpp Mon Aug 12 22:50:42 2013 -0400 @@ -49,34 +49,34 @@ pts.push_back(kpts[i].pt); } -IplImage* allocateImage(const int& width, const int& height, const int& depth, const int& channels) { return ::allocateImage(cvSize(width, height), depth, channels);} +// IplImage* allocateImage(const int& width, const int& height, const int& depth, const int& channels) { return ::allocateImage(cvSize(width, height), depth, channels);} -IplImage* allocateImage(const CvSize& size, const int& depth, const int& channels) { - IplImage* image = cvCreateImage(size, depth, channels); +// IplImage* allocateImage(const CvSize& size, const int& depth, const int& channels) { +// IplImage* image = cvCreateImage(size, depth, channels); - if (!image) { - cerr << "Error: Couldn't allocate image. Out of memory?\n" << endl; - exit(-1); - } +// if (!image) { +// cerr << "Error: Couldn't allocate image. Out of memory?\n" << endl; +// exit(-1); +// } - return image; -} +// return image; +// } -int goToFrameNum(CvCapture* inputVideo, const int& currentFrameNum, const int& targetFrameNum) { - int frameNum = currentFrameNum; - if (currentFrameNum > targetFrameNum) { - cerr << "Current frame number " << currentFrameNum << " is after the target frame number " << targetFrameNum << "." << endl; - } else if (currentFrameNum < targetFrameNum) { - IplImage* frame = cvQueryFrame(inputVideo); - frameNum++; - while (frame && frameNum<targetFrameNum) { - frame = cvQueryFrame(inputVideo); - frameNum++; - } - } +// int goToFrameNum(CvCapture* inputVideo, const int& currentFrameNum, const int& targetFrameNum) { +// int frameNum = currentFrameNum; +// if (currentFrameNum > targetFrameNum) { +// cerr << "Current frame number " << currentFrameNum << " is after the target frame number " << targetFrameNum << "." << endl; +// } else if (currentFrameNum < targetFrameNum) { +// IplImage* frame = cvQueryFrame(inputVideo); +// frameNum++; +// while (frame && frameNum<targetFrameNum) { +// frame = cvQueryFrame(inputVideo); +// frameNum++; +// } +// } - return frameNum; -} +// return frameNum; +// } const Scalar Colors::color[] = {Colors::red(), Colors::green(),