# HG changeset patch # User Nicolas Saunier # Date 1376362242 14400 # Node ID 5eeb3b9fb568a2c19ea630f9cab3a94b6fe5bdcf # Parent 37c7b46f6e212c744b8bdcf3f2755f51c9803dd0 commented problem code (opencv 2.4.6) diff -r 37c7b46f6e21 -r 5eeb3b9fb568 c/cvutils.cpp --- 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) { +// 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& kpts, std::vector& pts, const bool& clearPts = true); /** Allocates a new IplImage. */ -IplImage* allocateImage(const int& width, const int& height, const int& depth, const int& channels); +// IplImage* allocateImage(const int& width, const int& height, const int& depth, const int& channels); -IplImage* allocateImage(const CvSize& size, const int& depth, const int& channels); +// IplImage* allocateImage(const CvSize& size, const int& depth, const int& channels); /** Goes to the target frame number, by querying frame, supposing the video input is currently at current frame number. Returns the frame number that was reached.*/ -int goToFrameNum(CvCapture* inputVideo, const int& currentFrameNum, const int& targetFrameNum); +// int goToFrameNum(CvCapture* inputVideo, const int& currentFrameNum, const int& targetFrameNum); /// Pre-defined colors class Colors {