Copyright ยฉ 2025 webdevpathiraja All rights reserved. This project is licensed under the MIT License.
This project uses MediaPipe and OpenCV to track hands in real-time using a webcam. It detects hand landmarks and draws them on the frame, displaying the tracking in a live video window. The hand landmarks are displayed as red dots, and the connections between the landmarks are drawn with green lines.
To run this project, make sure you have the following Python libraries installed:
opencv-python (for webcam capture and image processing)mediapipe (for hand tracking)You can install these libraries using pip:
pip install opencv-python mediapipe
Clone this repository to your local machine:
git clone https://github.com/webdevpathiraja/AI-Hand-Tracking-on-CPU-in-Real-Time.git
cd AI-Hand-Tracking-on-CPU-in-Real-Time
Install the necessary dependencies:
pip install -r requirements.txt
Run the script:
python main.py
This will open a webcam window showing the tracked hand landmarks. The landmarks will be drawn as red dots, and green lines will represent the connections between the landmarks.
Press q to exit the program.
q to exit the application.Each hand has 21 landmarks, numbered from 0 to 20. Here are the main landmarks:
These landmarks are used to draw connections between each joint in the hand.