Skip to content

AlanLopRey/gesture_scroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scroll Camera

Docs en español

Description

This Python program uses your webcam along with MediaPipe to detect hand gestures and control the cursor and scroll on your screen.

Motivation

I often find myself sitting for long periods unnecessarily, such as when reading documentation or watching tutorials and online courses. This small program helps reduce unnecessary sitting by allowing you to control your computer remotely with hand gestures.

Requirements

  • Python 3.x (Download Python)
  • OpenCV
    pip install opencv-python
  • MediaPipe
    pip install mediapipe
  • NumPy
    pip install numpy

Usage

  1. Clone this repository or download the scroll_camera.py file.
  2. Run the script:
    python scroll_camera.py
  3. Follow the on-screen instructions to allow camera access.
  4. Use the specified hand gestures to control the cursor and scrolling.

if you clone all the repo you need to run the script with

  python gesture-scroll/scroll_camera.py

Hand Gestures

Only one hand at a time ✋

Move the pointer: Make a fist. The pointer will follow your wrist (landmark 0). MediaPipe reference Scroll: Once you're in the right place, just open your hand. Scroll up: While showing your open palm ✋, rotate your hand to the right to scroll up. Scroll down: While showing your open palm ✋, rotate your hand to the left to scroll down.

Troubleshooting

  • If the camera feed doesn't appear, ensure no other application is using the camera.
  • For gesture recognition issues, ensure your hand is visible and well-lit.
  • Adjust the camera resolution in the script for better performance on low-spec machines.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • MediaPipe for the hand tracking solution.
  • OpenCV for computer vision capabilities.
  • NumPy for numerical operations.
  • Inspiration from various open-source gesture control projects.

About

use your camera to replace your mouse (only for cursor and scroll now)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages