Fingertip detection and tracking for recognition of air-writing in videos

Sohom Mukherjee, Sk. Arif Ahmed, Debi Prosad Dogra, Samarjit Kar, Partha Pratim Roy · DOI

Abstract

Air-writing offers a natural and intuitive modality for Human-Computer Interaction (HCI), allowing users to input text by gesturing in free space. However, implementing this on standard RGB webcams is challenging due to the lack of physical delimiters (pen-up/pen-down signals) and the difficulty of precise fingertip tracking against cluttered backgrounds. This paper introduces a robust, real-time system that combines deep learning with geometric analysis. By utilizing Faster R-CNN for hand localization and a novel "distance-weighted curvature entropy" function for fingertip pinpointing, the system achieves a character recognition accuracy of 96.11% at 18.5 FPS.

Introduction

Traditional text input methods often require physical contact with a device. Air-writing, the act of writing characters in 3D space, offers a more natural interface for emerging technologies like Virtual Reality (VR), Augmented Reality (AR), and smart home systems. Unlike conventional handwriting, air-writing lacks a tactile feedback mechanism to signal the beginning or end of a stroke. Furthermore, tracking a small, moving target like a fingertip using a low-cost webcam is computationally demanding and prone to errors when the user's face or background elements interfere with skin-color-based detection.

Previous research has often relied on depth-sensing hardware (e.g., Microsoft Kinect) or specialized wearable sensors to overcome these hurdles. This work focuses on making air-writing accessible via ubiquitous RGB webcams by proposing a multi-stage pipeline that balances deep learning accuracy with the efficiency of traditional computer vision techniques.

Methodology

The proposed system follows a structured pipeline to process input video streams and recognize written characters, as illustrated in the system flowchart.

System pipeline for air-writing recognition, illustrating the stages from hand pose detection to character output.

1. Hand Detection and Initialization

The process begins with hand localization using the Faster R-CNN framework. To initiate the writing process, the user must adopt a specific "writing pose" (one finger raised). The system validates this pose by segmenting the hand using a combination of YCbCr skin color filtering and Gaussian Mixture Models (GMM) for background subtraction. Geometric properties are then analyzed to count raised fingers, ensuring the system only proceeds when the correct gesture is detected.

2. Fingertip Detection: Distance-Weighted Curvature Entropy

A core contribution of this work is the "Distance-Weighted Curvature Entropy" function used for precise fingertip localization. While deep learning identifies the general hand area, pinpointing the fingertip requires higher precision.

  • Curvature Entropy: This component identifies points of high curvature along the hand contour, effectively finding "pointy" features.
  • Distance Weighting: To distinguish the fingertip from other protrusions like knuckles or the palm's edge, the system prioritizes points furthest from the hand's centroid. This combined metric allows the system to lock onto the index fingertip with sub-pixel precision, even in low-resolution feeds.

3. Tracking and Stroke Termination

To maintain real-time performance (18.5 FPS), the system does not run the full detection pipeline on every frame. Instead, it employs Kernelized Correlation Filters (KCF) to track the hand's bounding box across frames. The heavy detection algorithm is only re-triggered every 50 frames or if tracking is lost.

The "segmentation" problem—determining when a character ends—is solved using a velocity threshold. When the fingertip's velocity drops below a predefined threshold $T$, the system interprets this as a virtual "pen-up" signal, concluding the current trajectory.

4. Character Recognition

The captured 2D trajectory is smoothed to remove jitter and then fed into an AlexNet Convolutional Neural Network (CNN). This network is pre-trained on the EMNIST dataset and fine-tuned to classify the air-written trajectory into one of 36 characters (0-9 and a-z).

Experimental Setup and Dataset

To evaluate the system, the authors developed a new Air-Writing Dataset specifically designed for webcam-based scenarios. Unlike existing "egocentric" datasets where the camera is head-mounted, this dataset features a front-facing view where the user's face is visible, presenting a significant challenge for skin-detection algorithms.

  • Data Volume: 1,800 video trajectories (10 samples each of 36 characters).
  • Participants: 5 subjects.
  • Environment: Varied backgrounds with significant "distractors" (e.g., the user's face).

Results and Discussion

The system's performance was evaluated based on tracking precision, recognition accuracy, and processing speed.

  • Tracking Precision: The proposed fingertip tracking method achieved a mean precision of 73.1% at a 15-pixel threshold, significantly outperforming standalone trackers like TLD or KCF.
  • Recognition Accuracy: The AlexNet-based classifier reached a high accuracy of 96.11%.
  • Real-time Performance: Running on a machine equipped with a GTX 1080, the pipeline achieved 18.5 FPS, which is sufficient for a fluid user experience.

A key insight from the results is the effectiveness of combining geometric refinement with deep learning. By using curvature entropy after the initial hand detection, the system achieves the precision necessary for writing without requiring a massive, specialized fingertip dataset. Furthermore, the use of a logical AND operation between skin masks and foreground masks ensures the system does not accidentally track the user's facial features.

Conclusion

This paper demonstrates a robust method for air-writing recognition using standard webcams. By addressing the "face challenge" through logical mask operations and solving the stroke segmentation problem with velocity thresholds, the authors have created a practical HCI tool. Future work will focus on expanding the system to handle continuous word recognition and exploring "air-signatures" for biometric security. Additionally, the authors plan to incorporate spatio-temporal features of the writing process to further enhance recognition robustness.

Summary updated

BibTeX
@article{mukherjee2019fingertip,
  author = {Sohom Mukherjee and Sk. Arif Ahmed and Debi Prosad Dogra and Samarjit Kar and Partha Pratim Roy},
  title = {{Fingertip detection and tracking for recognition of air-writing in videos}},
  journal = {Expert Systems with Applications},
  year = {2019},
  doi = {10.1016/j.eswa.2019.06.034},
}
Figure