From d9a322f6066113a0feeb055ecbc08bacef669d77 Mon Sep 17 00:00:00 2001 From: Martin Dlouhy Date: Wed, 12 Feb 2014 11:25:03 +0100 Subject: [PATCH] undo changes of cv2.cv.* functions/constants --- .../py_contours/py_contour_features/py_contour_features.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/py_tutorials/py_imgproc/py_contours/py_contour_features/py_contour_features.rst b/doc/py_tutorials/py_imgproc/py_contours/py_contour_features/py_contour_features.rst index 996da62a09..6b7c661cc5 100644 --- a/doc/py_tutorials/py_imgproc/py_contours/py_contour_features/py_contour_features.rst +++ b/doc/py_tutorials/py_imgproc/py_contours/py_contour_features/py_contour_features.rst @@ -127,7 +127,7 @@ Here, bounding rectangle is drawn with minimum area, so it considers the rotatio :: rect = cv2.minAreaRect(cnt) - box = cv2.cv.BoxPoints(rect) + box = cv2.boxPoints(rect) box = np.int0(box) cv2.drawContours(img,[box],0,(0,0,255),2) @@ -172,7 +172,7 @@ Similarly we can fit a line to a set of points. Below image contains a set of wh :: rows,cols = img.shape[:2] - [vx,vy,x,y] = cv2.fitLine(cnt, cv2.cv.CV_DIST_L2,0,0.01,0.01) + [vx,vy,x,y] = cv2.fitLine(cnt, cv2.DIST_L2,0,0.01,0.01) lefty = int((-x*vy/vx) + y) righty = int(((cols-x)*vy/vx)+y) cv2.line(img,(cols-1,righty),(0,lefty),(0,255,0),2)