This project aims to control the mouse cursor on a computer using a webcam. By tracking the movement of the user's hand or a specific object in front of the webcam, the program will interpret the motion and translate it into corresponding cursor movements.
To run this project, you will need the following:
- A computer with a webcam
- Python installed (version 3.8.8)
- Required Python libraries (virtualenv)
Follow the steps below to set up the project:
-
Clone the repository:
git clone https://github.com/naveedkhan1998/Mouse-Control-Using-Hand-Gestures.git
-
Navigate to the project directory:
cd Mouse-Control-Using-Hand-Gestures
-
Create a virtual environment and activate it:
pip install virtualenv virtualenv venv --python=python3.8.8 . .\venv\Scripts\activate pip install -r requirements.txt
-
Connect your webcam to the computer.
-
Run the main Python script while the virtual enivronment is running:
python main.py
-
The webcam feed will appear in a new window.
-
Place your hand in front of the webcam.
-
Move your hand or object to control the mouse cursor on the screen.
-
Press the
q
key to exit the program.
Contributions to this project are welcome. To contribute, follow these steps:
-
Fork the repository.
-
Create a new branch:
git checkout -b feature/your-feature-name
-
Make your modifications and commit them:
git commit -m "Add your commit message"
-
Push to the branch:
git push origin feature/your-feature-name
-
Create a pull request with a detailed description of your changes.
This project is licensed under the MIT License. You are free to modify and distribute the code. Please see the LICENSE file for more details.