TL;DR. Code is here.
Finger detection is an important feature of many computer vision applications. In this application, A histogram based approac...
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
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
version3.4.*
. You are facing this issue because you are using some higher version ofopencv-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.
Update this line...
From:
_, cont, hierarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
To:
cont, hierarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
That should fix the issue for CV 4.5
Thank you, it works
Hi, this is a great tutorial but my program will not recognize my hand. I hold it up in the proper position, but the green boxes remain. I know that my code is not wrong because I cross-referenced it with your github repo. Do you have any idea why this could be happening?
Hi @lukasswiss , I am glad that you liked my post.
Once you place your hand to cover all boxes, you have to press 'Z' key.
Amazing!
Thanks, Jeison!
Nice Amar, will be interested to see more from you here although I am not even a python coder!
Thanks @kataras , I am really happy that you liked it. 😊
Can we do this in MATLAB? If yes, how?
I have no idea about MATLAB, so can't say anything.
Wow this is super cool stuff!
Thanks @ben , glad you liked it!
It's awesome man! However, could you please tell me what kind of algorithm you used in calculating the farthest point?
What is the use of this project? Problem statement?
You copied this verbatim from here: benmeline.com/finger-tracking-with...
Please name your sources at least!
sir can we do if we write 5 in air then the output as 5 will be in the output can we do like that
You need this github.com/amarlearning/digit-reco...