cv2.boxPoints() used in tutorials does not exist in opencv 2.4.8 [closed]
Hello, In order to extract the rotated box from a contour, I used followin python script:
# cnt is a contour occurence
rect = cv2.minAreaRect(cnt)
box = cv2.boxPoints(rect)
And following error occurs : ''module' object has no attribute 'boxPoints'
Please help me.
Best regards.
where did you find the tutorial ? it seems, 3.0 has it, but 2.4.8 not.
Hello, You're right. It is tutorial
http://docs.opencv.org/trunk/doc/py_tutorials/py_imgproc/py_contours/py_contour_features/py_contour_features.html#contour-features
But, First) I have not found how to know "programatically" the exact version of openCV installed on the computer (I know that I have download the package 2.4.8, but...). Second) I don't know where to find the OpenCV release 3 for Windows and for Raspbian ?
Best regards
It's ok. I have found the package on SourceForge.
As I need Python lib, I only unpack and copy the file cv2.pyc in python site-package folder. the function boxPoints exists.
But for release, the cv2.getBuildInformation() gives a strange result:
General configuration for OpenCV 3.0.0-tp2 ===== Version control: 2.4.8-3169-g9f8de6
Best regards.
oh, nice to hear. if you're confused about the strange Version control numbers, - they're related to git, don't worry.
this solution didn't work for me is there an alternate? where is the source for opencv? is there an alternate method call?
@lapolonio either use opencv3.0, or, for 2.4, (maybe) fall back to cv2.cv.boxPoints()