This whitepaper outlines the architecture, algorithmic pipeline, and implementation details of the HovrPad Gesture Engine, an ultra-low-latency, zero-calibration optical mouse replacement designed for standard uncalibrated RGB webcams. By pairing 21-point 3D hand landmark tracking with a Two-Layer Hierarchical Smoothing Pipeline (Landmark EMA α=0.2 with fast jump recovery + Screen-Space One-Euro Filter β=0.1), a Decoupled Aiming and Trigger Architecture (Index pointing with Thumb-to-Middle tap triggering), and native user-mode Win32 User32 injection, the engine eliminates involuntary hand jitter without sacrificing pointing speed or responsiveness. Operating on standard x86_64 consumer machines, the system achieves an end-to-end motion-to-cursor latency of 14.2 ms at 60 FPS (<4.8% CPU footprint). Below we detail the multi-threaded pipeline, signal smoothing strategy, gesture finite state machines, and provide the compiled standalone binary.
Self-contained runtime package with bundled CPython interpreter, OpenCV 4.x runtime, MediaPipe graph models, and native Win32/C++ input drivers. Requires no administrative privileges or system-wide registry modifications.
e83c749a21b8f0449bc9304a98402a5bb018de9292c3004fa9d0421e4277c1d7
The HovrPad Gesture Engine processes optical sensor input through a decoupled, multi-threaded pipeline. Traditional webcam apps run image capture, model inference, and cursor updates in a single blocking thread, which introduces frame drops and noticeable input lag. In contrast, HovrPad isolates the ingestion and landmark inference loop from the OS input injector, dispatching multi-step actions asynchronously via lightweight daemon worker threads.
SetCursorPos,
mouse_event, keybd_event) with sub-millisecond dispatch. Multi-step
cadences
(such as Double Click and Right Click hold-delays) run on dedicated background threads to prevent UI
stalling.
Optical mouse control requires resolving two distinct noise profiles: raw landmark jitter in 3D camera space, and cursor trembling in 2D screen space during stationary targeting. HovrPad solves this using a two-layer architecture:
α = 0.2 in HandTracker. If rapid wrist repositioning occurs
(displacement > 0.10 in normalized space),
the filter momentarily boosts α to 0.8 to achieve instantaneous tracking recovery
with zero sluggishness.
(target_x, target_y) are filtered by a calibrated
OneEuroFilter
(min_cutoff = 1.0 Hz, β = 0.1). The cutoff frequency is modulated dynamically based on
velocity
estimates computed per frame time-delta dt. When the hand is stationary, smoothing is
maximized to freeze
the cursor; during rapid sweeps, the cutoff expands to track the finger with zero perceptible lag.
A classic flaw in vision-based virtual mice is using a thumb-to-index pinch to click. Pinching the thumb to the pointing finger collapses the fingertip's spatial position, causing severe cursor jitter and aim deflection at the exact moment of clicking.
The primary click detector calculates the geometric distance from the thumb tip landmark
(lm[4]) to the
middle finger skeletal segments (pt_to_segment and segment intersection tests). To prevent
click chattering
at the contact boundary, the engine enforces Schmitt-trigger pixel hysteresis:
This 20-pixel buffer zone ensures crisp single clicks and prevents unintended drops during long click-and-drag operations.
The following listing illustrates the landmark EMA pre-filtering and dynamic One-Euro screen coordinate smoothing pipeline:
import math
import time
from dataclasses import dataclass
class OneEuroFilter:
def __init__(self, min_cutoff: float = 1.0, beta: float = 0.1, d_cutoff: float = 1.0):
self.min_cutoff = min_cutoff
self.beta = beta
self.d_cutoff = d_cutoff
self.x_prev = 0.0
self.dx_prev = 0.0
self.t_prev = None
def _smoothing_factor(self, dt: float, cutoff: float) -> float:
r = 2.0 * math.pi * cutoff * dt
return r / (r + 1.0)
def filter(self, x: float, t: float) -> float:
if self.t_prev is None:
self.x_prev, self.t_prev = x, t
return x
dt = max(t - self.t_prev, 1e-4)
# 1. Filter the discrete derivative (velocity)
dx = (x - self.x_prev) / dt
alpha_d = self._smoothing_factor(dt, self.d_cutoff)
dx_hat = alpha_d * dx + (1.0 - alpha_d) * self.dx_prev
self.dx_prev = dx_hat
# 2. Modulate cutoff frequency dynamically based on velocity
fc = self.min_cutoff + self.beta * abs(dx_hat)
alpha = self._smoothing_factor(dt, fc)
# 3. Apply position EMA with speed-adaptive alpha
x_hat = alpha * x + (1.0 - alpha) * self.x_prev
self.x_prev, self.t_prev = x_hat, t
return x_hat
def smooth_landmark_ema(curr_pt: tuple, prev_pt: tuple, wrist_jump: bool) -> tuple:
# Fast catchup (0.8) on wrist repositioning jump; baseline (0.2) otherwise
alpha = 0.8 if wrist_jump else 0.2
return (
alpha * curr_pt[0] + (1.0 - alpha) * prev_pt[0],
alpha * curr_pt[1] + (1.0 - alpha) * prev_pt[1]
)
The HovrPad Gesture Engine is constructed using high-performance Python libraries and native Windows user32 APIs. All packages are statically bundled into the standalone zero-dependency portable executable.
| Library / Subsystem | Version | Target Role in Architecture | Execution Layer |
|---|---|---|---|
| MediaPipe (Hands) | 0.10.x | BlazePalm detector + 2.5D regression skeletal graph | TFLite XNNPACK / CPU SSE4.2 |
| OpenCV (cv2) | 4.8.x | DirectShow frame capture, color-space transforms | Intel IPP / OpenCL |
| NumPy | 1.24+ | Vectorized Euclidean metrics & point-to-segment geometry | OpenBLAS SIMD |
| PyWin32 (win32api / user32) | 306+ | Direct cursor positioning (SetCursorPos) & key events |
Windows User-Mode (Ring 3) |
| Two-Layer Filter Engine | Custom Python | Landmark EMA (α=0.2) + Screen OneEuroFilter (β=0.1) | In-memory pure Python pipeline |
Measurements were recorded across 5,000 consecutive interaction cycles on an Intel Core i7-11800H @ 2.30 GHz running Windows 11 x64 with a standard 1080p RGB USB sensor.
| Metric / Execution Stage | 30 FPS Sensor Ingestion | 60 FPS Sensor Ingestion | Standard Baseline (Non-filtered) |
|---|---|---|---|
| Frame Grab & Decode | 12.4 ms | 5.8 ms | 14.1 ms |
| Landmark Inference (BlazeHand) | 11.2 ms | 6.1 ms | 11.2 ms |
| Two-Layer Signal Conditioning | 0.4 ms | 0.3 ms | 0.0 ms (Disabled) |
| Win32 User32 Dispatch | 0.8 ms | 0.7 ms | 0.8 ms |
| Total Motion-to-Cursor Latency | 28.6 ms | 14.2 ms | 31.5 ms |
| Jitter RMS (Stationary Hand) | 0.38 px | 0.19 px | 4.72 px (Severely Tremulous) |
| Average CPU Utilization | 3.4% | 4.8% | 3.2% |
| Private Working Set Memory | 88.4 MB | 94.1 MB | 86.0 MB |
The HovrPad Gesture Engine organizes gestures into fundamental spatial navigation primitives (unlocked permanently in the Free engine) and advanced productivity modifiers (Pro profile).
| Gesture | Hand Configuration | Synthesized Action | Tier |
|---|---|---|---|
| Normal Pointer | Index finger extended, middle/ring/pinky folded | Continuous Cursor Movement | Free |
| Primary Left Click | Thumb tip taps Middle finger PIP-DIP (Index aims) | Left Click (Hold = Drag & Drop) | Free |
| Right Click | Thumb pinches Pinky with Index + Middle extended | Right Click Context Menu | Free |
| Double Click | Thumb taps curled Ring finger, Middle extended | Double Click Action | Free |
| Pause / Park | Closed Fist (all fingers curled) | Freeze / Park Cursor | Free |
| Open Palm | Full hand open | Resume Tracking | Free |
| D-Pad Navigation | 4-way Thumb orientation (UP/DOWN/LEFT/RIGHT) | Profile & Slide Navigation | Free |
| V-Sign (Paste) | Index + Middle extended with wide spread | Paste (Ctrl+V) |
Pro |
| Enter Pose | Thumb/Index/Middle extended → Curl Index/Middle | Press Enter |
Pro |
| 3-Finger Pinch (3FP) | Thumb, Index, and Middle tips pinched together | Minimize / Close Window | Pro |
| Window Maximize | Fist held (>10 frames) → Open Palm Spread | Maximize Active Window | Pro |
| Scroll Mode (Shaka) | Thumb + Pinky extended, middle fingers curled | Inertial 2D Page Scroll | Pro |
| Spider-Man (Alt-Tab) | Thumb + Index + Pinky extended, middle + ring curled | Window Switcher Overlay | Pro |
| L-Shape Modifier | Thumb + Index at 90° angle | Hold ALT Modifier |
Pro |
Because optical tracking detects finger contours from live RGB video, good ambient lighting helps the camera maintain a high shutter speed, preventing motion blur and ensuring accurate joint localization.
| Subsystem | Minimum Specification | Recommended Specification |
|---|---|---|
| Operating System | Windows 10 (64-bit, Build 19041+) | Windows 11 (64-bit, 22H2+) |
| Camera Sensor | 720p @ 30 FPS USB Webcam | 1080p @ 60 FPS Low-latency Webcam |
| CPU Compute | Quad-Core 2.0 GHz (x86_64 with SSE4.2 / AVX2) | Hexa-Core 2.5 GHz+ (Intel 11th Gen+ / Ryzen 5000+) |
| RAM Allocation | 4 GB System RAM | 8 GB+ DDR4/DDR5 Dual-Channel |
| Ambient Lighting | ≥ 150 Lux (Avoid strong backlight behind user) | ≥ 350 Lux Diffused Front Lighting |
If you reference this software or evaluate the HovrPad Gesture Engine in your research or project, please cite this engineering release:
@software{hovrpad_gesture_engine_2026,
author = {Priyadarshi, C. and HovrPad HCI Systems Group},
title = {HovrPad Gesture Engine: High-Fidelity Optical Gesture Recognition and Low-Latency Spatial Input Synthesis},
year = {2026},
version = {7.4.2},
publisher = {HovrPad.com},
url = {https://www.hovrpad.com/whitepaper.html}
}