← Back to Projects

🖐️ Hand-Controlled NUI Cursor System

A touchless Natural User Interface (NUI) desktop controller powered by Google's MediaPipe Tasks API and OpenCV. Designed to map real-time hand gestures and landmark tracking directly to OS cursor navigation and desktop interactions.


🎥 Project Demo Video

NUI Hand Cursor Demo


📋 Architecture & Overview

This system leverages the modern MediaPipe Tasks API (vision.HandLandmarker) running in VIDEO mode combined with OpenCV frame acquisition and PyAutoGUI OS-level automation. By extracting 21 3D hand landmark coordinates per hand in real time, the pipeline computes Euclidean landmark distances and vertical spatial ratios to trigger responsive desktop actions.


🎯 Gesture Interaction Matrix

Action Hand Pose & Landmarks Mathematical Trigger Visual Indicator
🖱️ Cursor Movement Single Index Finger Pointing Index Tip (Landmark 8) mapped via np.interp Green Skeleton & Joints
🖱️ Left Click Index + Thumb Pinch Distance(Thumb 4, Index 8) < 30px Green Banner ("LEFT CLICK")
🖱️ Right Click Pinky + Thumb Pinch Distance(Thumb 4, Pinky 20) < 30px Red Banner ("RIGHT CLICK")
📜 Scroll Up / Down Index + Middle Fingers Touching Distance(Index 8, Middle 12) < 30px & Vertical Threshold Yellow / Magenta Banner
✊ Grab / Drag Clenched Fist Avg Distance(Finger Tips to Wrist 0) < 100px White Banner ("GRAB / DRAG")

⚙️ Technical Highlights


📊 Model Evaluation & Performance

Core Strengths

Limitations & Edge Cases

Validation Test Matrix

Testing Environment Cursor Tracking Pinch Gestures (Click) Fist Detection (Drag)
Local HD Webcam (Standard Lighting) Operational Operational Operational
Extended Distance (>2 Meters) Operational Degraded Sensitivity Operational
Low-Illumination Environment 50% - 60% Accuracy Degraded 50% - 60% Accuracy

🔧 Technical Stack

Component Technology / Framework Application
Core Engine Python 3.11 Primary programming environment
Hand Tracking MediaPipe Tasks API Real-time 21-landmark 3D hand feature extraction
Computer Vision OpenCV Frame processing, visual annotations, and mirroring
OS Automation PyAutoGUI Native mouse positioning, clicking, and scrolling
Numerical Mapping NumPy Coordinate interpolation and range mapping

🚀 Engineering Roadmap


⚠️ Disclaimer & Discretion

Developed strictly for academic research, prototyping, and engineering portfolio demonstration. Designed as a proof-of-concept Natural User Interface (NUI) desktop control solution.