Hand isolation, Finger counting, and finger point tracking in Python with OpenCV
To run just type this command
python camera_feed.py
- Face the camera towards a relatively clear/consistent background
- Press 's' to capture the empty background. Don't put your hand in the frame when you do this
- Place hand so it covers all 9 green boxes and press 'a' This captures the skintones of your hand. Histogram back projection is then used to isolate the hand in the frame
- Remove hand from frame and press 's' once again. Optional but I had better results this way
- Press 'c' to start drawing contours and counting fingers
- Put up a single finger to draw gestures.
To clear your gesture at any time, press 'g'