gesture-recognition icon indicating copy to clipboard operation
gesture-recognition copied to clipboard

ValueError: not enough values to unpack

Open thinkmorestupidless opened this issue 6 years ago • 3 comments

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)

thinkmorestupidless avatar Jul 29 '19 13:07 thinkmorestupidless

getting same error..Can someone help?

PR-Iyyer avatar Aug 27 '19 12:08 PR-Iyyer

I'm just linking the PR that fixes this: https://github.com/Gogul09/gesture-recognition/pull/11

xmik avatar Oct 21 '19 21:10 xmik

In this line: (_, cnts, _) = cv2.findContours(thresholded.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) Put (cnts, ) instead of (, cnts, _) this worked for me.

SammyJay777 avatar Feb 09 '21 17:02 SammyJay777