https://github.com/asadityasonu/virtual-mouse
Virtual Mouse using OpenCV, mediapipe and pyautogui
https://github.com/asadityasonu/virtual-mouse
mediapipe opencv pyautogui python
Last synced: about 2 months ago
JSON representation
Virtual Mouse using OpenCV, mediapipe and pyautogui
- Host: GitHub
- URL: https://github.com/asadityasonu/virtual-mouse
- Owner: AsAdityaSonu
- Created: 2023-11-02T05:38:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-15T09:45:43.000Z (about 2 years ago)
- Last Synced: 2024-06-15T10:49:22.043Z (about 2 years ago)
- Topics: mediapipe, opencv, pyautogui, python
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.txt
Awesome Lists containing this project
README
### Hand Tracking Module
1. The script initializes a HandDetector class to manage hand tracking.
2. The findHands method detects hands in a frame.
3. The findPosition method extracts hand landmarks and bounding box.
4. The fingersUp method determines open or closed fingers.
5. The findDistance method calculates and visualizes distances.
6. The main function sets up video capture, processes frames, and displays the video stream.
7 .The application can be closed by pressing the 'q' key.
### Virtual Mouse
1. The script captures video from a webcam, detects hand gestures using the HandTrackingModule, and uses PyAutoGUI to control the cursor and perform clicks.
2. It includes logic to move the cursor when two fingers are open and click when the fingers are close together.
3. The frame rate (FPS) is calculated and displayed on the screen.
4. The application can be closed by pressing the 'q' key.