Closed staticabhi closed 7 years ago
Debugged the error!
i am using openCV 3, so i had to update contours, hierarchy = cv2.findContours(image, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
to _,contours, hierarchy = cv2.findContours(image, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
After this i got another error in cv2.ellipse(image_with_ellipse, ellipse, green, 2, cv2.CV_AA)
.
So if you're using openCV3 update this to cv2.ellipse(image_with_ellipse, ellipse, green, 2, cv2.LINE_AA)
I'm using Python 3.5.1 | Anaconda 2.4.1 (64-bit)
and getting the following error in the same script:
ValueError: too many values to unpack (expected 2)
Probably in this line: contours, hierarchy = cv2.findContours(image, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)