Skip to content

arafathosense/Hand-Rotation-Angle-Calculation-Using-Computer-Vision-NumPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖐️ Hand Rotation Angle Calculation Using Computer Vision NumPy

Real-Time Computer Vision System for Palm Orientation, Gesture Analytics & Interactive UI Rendering. This project implements a high-performance real-time hand-tracking system that calculates palm rotation angle using pure NumPy vector math, combined with MediaPipe and OpenCV for hand detection and visualization.

It includes a futuristic HUD (Heads-Up Display) with animated radial UI, fingertip gears, palm openness metrics, 21-point hand skeleton styling, and a gesture-aware cube/grid visualization. This repository serves as a complete example of integrating vector geometry, signal smoothing filters, 3D-like visual effects, and Computer Vision pipelines in Python.

Output

image image image image image image

🔥 Key Highlights

✔ Real-time Hand Tracking (21 Landmarks)
✔ Palm Rotation Angle (0°–360°) using NumPy
✔ Openness % based on fingertip–palm distances
✔ Dynamic Animated Radial UI & Gears
✔ Exponential Smoothing (No Jittering!)
✔ Fully Modular Code (Overlay + Utils + Main loop)
✔ Works Smoothly at 25-40 FPS

🧠 1. How Palm Rotation Angle is Calculated

Palm rotation is computed using vector orientation math:

  • Use wrist landmark (0)
  • Use middle finger MCP (9)
  • Create a vector:
    [ v = m-w ]
  • Compute angle using atan2(y, x)
  • Normalize to 0°–360°

👉 Formula (NumPy)

def compute_palm_rotation(landmarks):
    w = np.array(landmarks[0][:2])
    m = np.array(landmarks[9][:2])
    v = m-w
    angle = np.degrees(np.arctan2(v[1], v[0]))
    return float(angle % 360)

About

This project computes 3D hand rotation angles from landmark coordinates using Computer Vision NumPy-based vector operations. It enables robust orientation detection for CV pipelines such as gesture control and tracking. Optimized for integration with MediaPipe, OpenCV, and real-time applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages