Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Python Hand Tracking

A simple webcam hand-tracking app built with OpenCV and MediaPipe.

What it does

  • Opens your webcam
  • Detects hands in real time
  • Draws hand landmarks on the video feed
  • Swaps left and right labels to match the mirrored preview

Requirements

  • Windows
  • Python installed
  • Visual Studio Code installed
  • A webcam

First-time setup in VS Code

  1. Open VS Code.
  2. Choose File > Open Folder....
  3. If you have not downloaded the project yet, clone it from GitHub:
git clone <your-repo-url>
  1. Open the python-hand-tracking folder in VS Code.
  2. Open the integrated terminal in VS Code.

Create and activate the virtual environment

If the .venv folder already exists, activate it:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
.\.venv\Scripts\Activate.ps1

If .venv does not exist, create it first:

py -m venv .venv
.\.venv\Scripts\Activate.ps1

Install dependencies

Run this inside the activated virtual environment:

pip install opencv-python mediapipe

Run the program

python main.py

If python does not work in your terminal, try:

py main.py

How to quit

  • Press q in the video window, or
  • Click the X button on the window title bar

Notes

  • The first run downloads the MediaPipe hand landmarker model automatically.
  • Keep the webcam connected and allow camera access if Windows asks for permission.
  • If the window opens but stays black, close it, wait a moment, and run the program again.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages