Skip to content

DamsaraJayanath/Volume_Controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โœ‹ Hand Gesture-Based Volume Control System

This project is a real-time hand gesture-based volume control system built using Python, OpenCV, MediaPipe, and PyCAW. It allows users to control the system volume by simply moving their fingers in front of the webcam.

๐Ÿ”ง Features

  • Detects hand landmarks using MediaPipe
  • Tracks thumb and index finger tips
  • Calculates the distance between fingers to adjust system volume
  • Displays a live volume bar and percentage on the screen
  • Provides real-time feedback with smooth and responsive UI
  • Runs directly from webcam input

๐Ÿ›  Technologies Used

  • Python
  • OpenCV
  • MediaPipe
  • PyCAW (Python Core Audio Windows Library)
  • NumPy

๐Ÿ“‚ File Structure

  • handTrack.py: Hand tracking module using MediaPipe
  • test.py: Main application to control volume based on finger distance

๐Ÿ“Œ How It Works

  1. The system captures video from the webcam.
  2. Detects the user's hand and tracks landmarks.
  3. Measures the distance between the thumb tip and index finger tip.
  4. Maps that distance to the system's audio volume level.
  5. Updates the volume and shows a visual representation on the screen.

โ–ถ๏ธ Usage

Run the following command to start the application:

python test.py

Press q to quit the program.

โš ๏ธ Requirements

  • Windows OS (required by Pycaw)
  • Webcam
  • Python packages:
    • opencv-python
    • mediapipe
    • pycaw
    • numpy
    • comtypes

Install all dependencies:

pip install opencv-python mediapipe pycaw numpy comtypes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages