Real-time computer vision studio featuring dynamic hand selection masks, gesture-controlled effect engines, Exponential Moving Average (EMA) keypoint smoothing, and a 3D aviator sunglasses face-mesh tracking engine built with OpenCV and MediaPipe.
- ๐ฏ Sub-Pixel Keypoint Smoothing: Implements Exponential Moving Average (EMA) filtering across landmark tracks to eliminate micro-jitter without adding frame latency.
- ๐ถ๏ธ 3D Sunglasses Engine: Procedurally renders aviator-style sunglasses with dynamic scaling, specular glare lines, rotational tracking, and smooth snap-to-eyes alignment using MediaPipe FaceMesh.
- โ Dynamic Selection Masking:
- 2-Finger Circle: Pinch thumb and index to create an adjustable circular effect lens.
- 4-Finger Bounding Box: Bring both hands into frame to dynamically target rectangular regions with HUD reticles.
- โ Hold-to-Trigger Fist Gestures: Integrated radial progress ring around palm centroids for seamless effect switching without touch input.
- ๐จ 9 Real-Time Image Processing Filters:
- Invert, Thermal Map, Cyber Edges, 8-Bit Pixelate, Retro Sepia, Soft Blur, RGB Glitch, Night Vision, and 3D Sunglasses.
- ๐ฅ๏ธ Minimal Dark-Glass HUD: Semi-transparent HUD overlay displaying real-time FPS, active menu state, and control guides.
- Python 3.8 or higher
- Webcam / Video Capture Device
Install OpenCV, NumPy, and MediaPipe using pip:
pip install opencv-python numpy mediapipe- [1] - [9] : Direct Switch to Effects 1โ9
- [F] : Toggle Fullscreen Mode
- [Q] : Quit Application
- Pinch (Thumb + Index Tip) : Drag/position 3D Sunglasses or spawn a circular FX lens
- 2 Hands (4 Fingertips Out) : Draw a rectangular HUD bounding box with corner brackets
- Hold 1 Fist (0.85 sec) : Cycle to NEXT effect
- Hold 2 Fists (0.85 sec) : Cycle to PREVIOUS effect
- Look into Camera : Auto-snap 3D Sunglasses onto eyes (when face is visible)