Closed codingquark closed 7 years ago
In order for demo.py to work with OpenCV 3, update these lines:
[35] _, contours, hierarchy = cv2.findContours(image, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
[51] cv2.ellipse(image_with_ellipse, ellipse, green, 2, cv2.LINE_AA)
Awesome. Thanks!
First issue is this line:
contours, hierarchy = cv2.findContours(image, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
This says too many values to unpack. Also changed the name of the image from
yo
toberry
.So I added one more variable and getting this error:
May be it is due to the OpenCV version I'm using, but I am not sure.