# HG changeset patch # User Nicolas Saunier # Date 1384234727 18000 # Node ID 2be846d36dec28f2ab543a1435211b78753b7b37 # Parent 70accfa6692fcf8ea9bbb66f244eb2335d46e6e9 reverted to stable OpenCV release 2.4.6 diff -r 70accfa6692f -r 2be846d36dec c/InputVideoFileModule.cpp --- a/c/InputVideoFileModule.cpp Tue Nov 05 23:42:28 2013 -0500 +++ b/c/InputVideoFileModule.cpp Tue Nov 12 00:38:47 2013 -0500 @@ -6,8 +6,8 @@ { mInit = mVideoCapture.open(videoPath.c_str()); double frameCount; - frameCount = mVideoCapture.get(cv::CAP_PROP_FRAME_COUNT); - mSize = cv::Size(mVideoCapture.get(cv::CAP_PROP_FRAME_WIDTH), mVideoCapture.get(cv::CAP_PROP_FRAME_HEIGHT)); + frameCount = mVideoCapture.get(CV_CAP_PROP_FRAME_COUNT); + mSize = cv::Size(mVideoCapture.get(CV_CAP_PROP_FRAME_WIDTH), mVideoCapture.get(CV_CAP_PROP_FRAME_HEIGHT)); mNumberOfFrame = (unsigned int)frameCount; } @@ -15,7 +15,7 @@ void InputVideoFileModule::setFrameNumber(const unsigned int& frameNumber) { - mVideoCapture.set(cv::CAP_PROP_POS_FRAMES, frameNumber); + mVideoCapture.set(CV_CAP_PROP_POS_FRAMES, frameNumber); } bool InputVideoFileModule::getNextFrame(cv::Mat& outputPicture) diff -r 70accfa6692f -r 2be846d36dec include/InputVideoFileModule.h --- a/include/InputVideoFileModule.h Tue Nov 05 23:42:28 2013 -0500 +++ b/include/InputVideoFileModule.h Tue Nov 12 00:38:47 2013 -0500 @@ -4,7 +4,7 @@ #include "InputFrameProviderIface.h" #include #include "opencv2/core/core.hpp" -#include "opencv2/highgui.hpp" +#include "opencv2/highgui/highgui.hpp" class InputVideoFileModule : public InputFrameProviderIface { diff -r 70accfa6692f -r 2be846d36dec python/cvutils.py --- a/python/cvutils.py Tue Nov 05 23:42:28 2013 -0500 +++ b/python/cvutils.py Tue Nov 12 00:38:47 2013 -0500 @@ -122,7 +122,7 @@ key = -1 ret = True frameNum = firstFrameNum - capture.set(cv2.CAP_PROP_POS_FRAMES, firstFrameNum) + capture.set(cv2.cv.CV_CAP_PROP_POS_FRAMES, firstFrameNum) while ret and not quitKey(key): ret, img = capture.read() if ret: @@ -130,7 +130,7 @@ print('frame {0}'.format(frameNum)) frameNum+=1 if text != None: - cv2.putText(img, text, (10,50), cv2.FONT_HERSHEY_PLAIN, 1, cvRed) + cv2.putText(img, text, (10,50), cv2.cv.CV_FONT_HERSHEY_PLAIN, 1, cvRed) cvImshow('frame', img, rescale) key = cv2.waitKey(wait) cv2.destroyAllWindows() @@ -141,9 +141,9 @@ images = [] capture = cv2.VideoCapture(videoFilename) if capture.isOpened(): - nDigits = int(floor(log10(capture.get(cv2.CAP_PROP_FRAME_COUNT))))+1 + nDigits = int(floor(log10(capture.get(cv2.cv.CV_CAP_PROP_FRAME_COUNT))))+1 ret = False - capture.set(cv2.CAP_PROP_POS_FRAMES, firstFrameNum) + capture.set(cv2.cv.CV_CAP_PROP_POS_FRAMES, firstFrameNum) imgNum = 0 while imgNum