Skip to content

Hand Gesture Recognition for Controlling Computer's Apps, Games, Media, Browsers, etc. This is a Python project for controlling a computer's mouse cursor using hand gestures. The program recognizes hand gestures through a webcam using the Mediapipe library and controls the mouse cursor via the PyAutoGUI library. More Feature coming soon

License

Notifications You must be signed in to change notification settings

gauravyad12/DarkDev-Hand-Gesture-Recognition-for-Pc-Controlling

Repository files navigation

README

Hand Gesture Recognition for Controlling Computer's Apps, Games, Media, Browsers, etc.

This is a Python project for controlling a computer's mouse cursor using hand gestures. The program recognizes hand gestures through a webcam using the Mediapipe library and controls the mouse cursor via the PyAutoGUI library.

The project is divided into two files, app.py and controller.py. The app.py file contains the main program logic while controller.py is responsible for handling the mouse cursor movement and click events.

There is an extra file, requirements.txt which you can use to install the libraries required for this project.

You can install these libraries using pip:

  • pip install opencv-python mediapipe pyautogui

Or you can use the following command using pip to avoid any library version issue:

  • pip install -r requirements.txt

Or Any error run this command :

  • pip install -r requirements.txt --upgrade

How to Run

After installing the required libraries, run the app.py file in a Python environment with a webcam. The program will start capturing video from the webcam, and the mouse cursor can be controlled using the following hand gestures:

  • Cursor moving: Raise all fingers together and move your hand to move the cursor and control it.

         Mouse_moving

  • Cursor freezing: Close your thumb and Raise all other fingers together freeze the cursor and prevent it from moving.

         Mouse_freezing

  • Drag and drop: Close your hand into a fist and move it around to drag and drop objects.

         Drag

  • Right-click: Raise your index finger while keeping the other fingers closed.

         Right_click

  • Left-click: Raise your middle finger while keeping the other fingers closed.

         Left_click

  • Double-click: Raise your index and middle finger while keeping the other fingers closed.

         Double_click

  • Scroll up: Move your index and middle finger towards the screen.

         Scrolling_up

  • Scroll down: Move your index and middle finger away from the screen.

         Scrolling_down

  • Zoom in: Pinch your index finger and thumb together.

         Zooming_in

  • Zoom out: Spread your index finger and thumb apart.

         Zooming_out

Limitations

The program currently only supports controlling a single mouse cursor, and it may not work well in low-light conditions. It also doesn't support handling gestures of more than one hand, however this is easy to overcome, may be in comming commits of this project.

License

This project is licensed under the Apache License 2.0. The Apache License 2.0 is a permissive license that allows you to freely use, modify, distribute, and sell the software.

Some feature Will Uploaded Soon

  • Hand Gesture Recognition for controlling computer's Apps.
  • Hand Gesture Recognition for controlling computer's Games.
  • Hand Gesture Recognition for controlling computer's Media.
  • Hand Gesture Recognition for controlling computer's Browsers.

Note

  • This project is still under development and may not

Follow me on social media

About

Hand Gesture Recognition for Controlling Computer's Apps, Games, Media, Browsers, etc. This is a Python project for controlling a computer's mouse cursor using hand gestures. The program recognizes hand gestures through a webcam using the Mediapipe library and controls the mouse cursor via the PyAutoGUI library. More Feature coming soon

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages