Skip to content

harshaparida/Controlling_volume_using_hand-gestures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Hand Gesture Volume Control

Hand Gesture Volume Control Python OpenCV

Overview

Control your system volume with the wave of your hand! This project uses a webcam to capture real-time hand movements and adjusts the volume based on the distance between your thumb and index finger.

Features

  • Real-time Hand Tracking: Utilizes MediaPipe for accurate hand detection.
  • Volume Control: Adjust system volume by varying the distance between your thumb and index finger.
  • Visual Feedback: Interactive graphics to show current volume and hand landmarks.

Table of Contents

Requirements

  • Python 3.x
  • OpenCV
  • MediaPipe
  • PulseAudio

Installation

  1. Clone the repository:

    git clone https://github.com/harshaparida/Controlling_volume_using_hand_gestures.git
    cd hand-gesture-volume-control
  2. Install the required packages:

    pip install opencv-python mediapipe pulsectl

Usage

Run the following command to start the volume control application:

python hand_gesture_control.py

How It Works

  1. Capture Video: The webcam captures video frames.
  2. Process Frames: MediaPipe processes the frames to detect hand landmarks.
  3. Calculate Distance: The distance between the thumb and index finger is calculated.
  4. Adjust Volume: The system volume is adjusted based on the distance.

Visual Feedback

  • Hand Landmarks: The thumb and index finger are highlighted with green circles.
  • Connecting Line: A green line connects the thumb and index finger.
  • Background Color: The background color changes based on the volume level.
  • Volume Display: Current volume percentage is displayed on the frame.

Enhance your multimedia experience with just a wave of your hand. Happy coding!


About

No description, website, or topics provided.

Resources

License

Stars

5 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages