https://github.com/kareem1207/hand-gestures
A Python code used to operate laptop using fingers
https://github.com/kareem1207/hand-gestures
mediapipe-hands opencv-python pyautogui python
Last synced: over 1 year ago
JSON representation
A Python code used to operate laptop using fingers
- Host: GitHub
- URL: https://github.com/kareem1207/hand-gestures
- Owner: kareem1207
- License: mit
- Created: 2024-11-22T15:42:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-24T14:18:09.000Z (over 1 year ago)
- Last Synced: 2025-01-23T15:54:57.960Z (over 1 year ago)
- Topics: mediapipe-hands, opencv-python, pyautogui, python
- Language: Python
- Homepage:
- Size: 6.99 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hand Gestures
## Introduction
This is code is used for controlling laptop developed using python.
## Description
The file named "main.py" is the code which runs captures the video and the gestures of done by the user which is fingers count. This code have a lot of dependencies as we are using modules for detecting the gestures.
## Installation and Usage
### Clone the Repository
git clone
cd
### Install dependencies
pip install opencv-python mediapipe pyautogui
### Run the Script
python main.py
### Opencv
The use of opencv library in this code is to capture the video from the camera of the computer and show what it is seeing using "cv2.imshow()" and capturing video using "cv2.VideoCapture(value)".
- value:0 = gets the video data from the primary camera.
- value:1 = gets the video data from the secondary camera.
- value:-1 = gets the video data from the nearest camera.
### Mediapipe
The use of Mediapipe library in this code mandatory as it detects the hand motion , it is basically developed using non regression concept and it is flexible as we can use that for many functionality like face detection , motion detection etc..
in this code we are detecting the code based on the confidence levels of the computer that the hand in a video is really hand , it has been set to 90%(0.9) and can be changed to any value.
### Pyautogui
The use of Pyautogui library in this code is used to perform operations like clicking a certain key board button
## Tech stack
- python
## Requirements
- python version 3.12.7 or below
- a good code editor like vs code , anaconda , etc..
- modules like opencv , mediapipe , pyautogui
## Features
- controlling laptop using finger gestures
- customization
## Output
This is the output of the code (sorry not suited in better environment) :
[](output.mp4)
## Gestures table
| Count | Gestures |
| :---: | :------: |
| 1 | left |
| 2 | right |
| 3 | down |
| 4 | up |
| 5 | space |
> [!Note]
> Please always check for the version as opencv , mediapipe and pyautogui is not at all integrated to python version 3.13
> [!Tip]
> It is suggested to check for the requirements by using bellow command
> pip install opencv mediapipe pyautogui or
> pip install opencv , pip install mediapipe, pip install pyautogui don't run at a time