# HG changeset patch # User Nicolas Saunier # Date 1375890154 14400 # Node ID 37c7b46f6e212c744b8bdcf3f2755f51c9803dd0 # Parent a9e275b4ecb7551fe7c10640da3ad086593400be update to OpenCV 2.6 diff -r a9e275b4ecb7 -r 37c7b46f6e21 python/cvutils.py --- a/python/cvutils.py Wed Jul 31 02:54:18 2013 -0400 +++ b/python/cvutils.py Wed Aug 07 11:42:34 2013 -0400 @@ -84,7 +84,7 @@ H, mask = cv2.findHomography(srcPoints, dstPoints, method, ransacReprojThreshold) return H - def arrayToCvMat(a, t = cv2.cv.CV_64FC1): + def arrayToCvMat(a, t = cv2.CV_64FC1): '''Converts a numpy array to an OpenCV CvMat, with default type CV_64FC1.''' print('Deprecated, use new interface') cvmat = cv2.cv.CreateMat(a.shape[0], a.shape[1], t) @@ -122,7 +122,7 @@ key = -1 ret = True frameNum = firstFrameNum - capture.set(cv2.cv.CV_CAP_PROP_POS_FRAMES, firstFrameNum) + capture.set(cv2.CAP_PROP_POS_FRAMES, firstFrameNum) while ret and not quitKey(key): ret, img = capture.read() if ret: @@ -141,9 +141,9 @@ images = [] capture = cv2.VideoCapture(videoFilename) if capture.isOpened(): - nDigits = int(floor(log10(capture.get(cv2.cv.CV_CAP_PROP_FRAME_COUNT))))+1 + nDigits = int(floor(log10(capture.get(cv2.CAP_PROP_FRAME_COUNT))))+1 ret = False - capture.set(cv2.cv.CV_CAP_PROP_POS_FRAMES, firstFrameNum) + capture.set(cv2.CAP_PROP_POS_FRAMES, firstFrameNum) imgNum = 0 while imgNum