Skip to content

sw-song/RealTime_Gesture_VolumeControl

Repository files navigation

How it works? (only Mac)

  1. run main.py in terminal
python main.py
  1. When you place your palm on the cam, the red box recognizes your hand.

  2. And Now, clench your fist. Then two blue rings are formed on the index finger and thumb.

  3. 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.)

  1. 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 By Step Tutorial

1. Basic Hand Pose Estimation

Step 1. Import Libraries
Step 2. Load Modules
Step 3. Image Detection Function
Step 4. Control Web Cam

2. Advanced Hand Pose Estimation

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

3. Hand Tracking Basic

  • Resolved No Response issues
  • Display fps(frame per seconds)
  • Display Circle on Image(Frame) based on image size

4. Hand Tracking using Module

  • Same Result(Video Display) with 3. Hand Tracking Basic
  • But Used Module that implemented as classes

5. Volume Control with Hand Tracking (FPS < 3)

  • Volume Control using osascript(on Mac)

5. Volume Control with Hand Tracking (FPS > 10)

  • Volume Control using NSAppleScript (on Mac)

6. Volume Control with Hand Tracking

  • New Design (Color, Shape, Circle Size)

7. Volume Control with Hand Tracking - version 2

  • Apply screen(Display Design) change when clenching and opening a fist

7. Volume Control with Hand Tracking - version 2, blue color

  • apply blue color