loading...

re: Finger Detection and Tracking using OpenCV and Python VIEW POST

FULL DISCUSSION
 

Got this error after I pressed 'z' key:

Traceback (most recent call last):
File "FingerDetection.py", line 186, in
main()
File "FingerDetection.py", line 171, in main
manage_image_opr(frame, hand_hist)
File "FingerDetection.py", line 136, in manage_image_opr
contour_list = contours(hist_mask_image)
File "FingerDetection.py", line 23, in contours
_, cont, hierarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
ValueError: not enough values to unpack (expected 3, got 2)

Do you have any idea?

 

@tungts1101 I will suggest you use opencv-python version 3.4.*. You are facing this issue because you are using some higher version of opencv-python.

You can download the correct dependencies using requirement.txt file present in the repository.

Hint: Use command sudo pip install -r requirement.txt

 

That's work. But I think there's still something need to be done in order to eliminate noise in background.

Yes, that's an issue. You can take that up if you want.

Some comments have been hidden by the post's author - find out more

Code of Conduct Report abuse