- run
main.py
in terminal
python main.py
-
When you place your
palm
on the cam, the red box recognizes your hand. -
And Now, clench your fist. Then two blue rings are formed on the index finger and thumb.
-
You can adjust the volume by spreading your index finger and thumb while holding your fist with the other three fingers. ( In fact, from the beginning, the controller works by folding the remaining three fingers except for the thumb and index finger.)
- As for the cam, if the palm faces upward rather than the front (ie, the cam faces downward), the action is reversed as shown below.
Step 1. Import Libraries
Step 2. Load Modules
Step 3. Image Detection Function
Step 4. Control Web Cam
Added features
- Detect Left and Right Hand
Step 1. Import Libraries
Step 2. Load Modules
Step 3. Function Definition
3-a. Get Each Hand Label
3-b. Image Detection
Step 4. Control Web Cam
- Resolved No Response issues
- Display fps(frame per seconds)
- Display Circle on Image(Frame) based on image size
- Same Result(Video Display) with
3. Hand Tracking Basic
- But Used Module that implemented as classes
- Volume Control using
osascript
(on Mac)
- Volume Control using
NSAppleScript
(on Mac)
- New Design (Color, Shape, Circle Size)
- Apply screen(Display Design) change when clenching and opening a fist
- apply blue color