Skip to content

Torajabu/Hand-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

HandTracker with gesture extensions

HandTracker is a Python-based project that uses computer vision to detect and track hands in real-time using a webcam. This project leverages the power of cvzone and opencv-python libraries to achieve hand detection and finger recognition.

Features Real-time hand detection and tracking. Finger recognition to identify which fingers are up. Easy to use and extend for various hand gesture applications.

Installation

To get started with HandTracker, you'll need to install the required dependencies. You can do this using pip:

bash pip install cvzone opencv-python

How It Works

Video Capture: The script starts by capturing video from the default webcam. Hand Detection: It then initializes the hand detector using cvzone's HandDetector module. Hand Tracking: In each frame, it detects hands and draws landmarks on the detected hands. Finger Recognition: The script prints the status of fingers (whether each finger is up or down) to the console. Display: The processed video is displayed in a window. Press 'q' to exit the program.

Detecting specific gestures

Extending the Code - Here is an example to extend the project for recognizing the "punch" gesture (all fingers down) and the "hi" gesture (all fingers up):

if fingers == [0, 0, 0, 0, 0]: cv2.putText(img, "Punch", (50, 50), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 255), 2) elif fingers == [1, 1, 1, 1, 1]: cv2.putText(img, "Hi", (50, 50), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), 2)

Acknowledgments

cvzone for the hand detection module.

OpenCV for the computer vision functionalities.

Usage: In order to use this dataset, please, cite Hand-Tracker by Rajabudeen Ahamed. M and link to this Github repo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages