gesture-recognition
gesture-recognition copied to clipboard
ValueError: not enough values to unpack
Guessing i'm missing something obvious here - requires a specific (older) version of opencv-python?
Traceback (most recent call last):
File "segment.py", line 94, in <module>
hand = segment(gray)
File "segment.py", line 38, in segment
(_, cnts, _) = cv2.findContours(thresholded.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
ValueError: not enough values to unpack (expected 3, got 2)
getting same error..Can someone help?
I'm just linking the PR that fixes this: https://github.com/Gogul09/gesture-recognition/pull/11
In this line: (_, cnts, _) = cv2.findContours(thresholded.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) Put (cnts, ) instead of (, cnts, _) this worked for me.