Chemical Symbol Feature Set for Handwritten Chemical Symbol Recognition

Peng Tang, Siu Cheung Hui, Chi-Wing FuS+SSPR 2014

Abstract

Handwritten chemical symbol recognition is a complex task due to the variety of characters, bonds, and spatial arrangements involved. This paper introduces CF44, a novel set of 44 features designed for trajectory-based (online) recognition systems. By integrating writer-dependent temporal data, writer-independent geometric features, and context-aware environmental features, the proposed system achieves a high recognition accuracy. Experimental results using the iDrawChem system demonstrate a Precision@1 of 93.80%.

Introduction

The recognition of chemical symbols—comprising letters, digits, bonds, and operators—poses unique challenges. Unlike standard text, chemical formulas often include subscripts, superscripts, and various bond orientations. Current recognition approaches generally split into image-based (offline) and trajectory-based (online) methods. While image-based methods excel at capturing static shapes, they lose the rich temporal information inherent in the writing process. Conversely, many online systems focus too heavily on timing and speed, neglecting the visual structure and context.

The CF44 Feature Set

To bridge this gap, the researchers proposed the CF44 feature set, which categorizes 44 features into three distinct groups:

1. Writer Dependent (WD) Features

These 11 features capture the dynamics of the writing process. They include stroke start and end points, writing direction, total stroke count, and "closure"—a metric determining if a stroke forms a closed loop (like 'O') or remains open (like 'I').

2. Writer Independent (WI) Features

Comprising 31 features, this group focuses on the geometric "look" of the symbol. Key features include the bounding box aspect ratio, curvature, and perpendicularity (to detect sharp corners).

Geometric features: Stroke turning angle and segment orientation used to calculate pattern curvature.

A critical component of the WI set is the use of Directional Histograms. This technique analyzes the spatial distribution and orientation of stroke segments, which is particularly useful for identifying chemical bonds that may appear at various angles.

Spatial analysis of a stroke segment within a grid for feature extraction.

3. Context Environment (CE) Features

The final 2 features provide the "where" and "what else." By considering the type of the preceding symbol and the relative height of the current symbol, the system can better distinguish between ambiguous characters, such as a capital 'C' versus a lowercase 'c', or an 'O' versus a '0'.

Methodology and Evaluation

The features were evaluated using iDrawChem, an iOS-based data collection tool. Data was gathered from 10 users, resulting in 4,680 valid symbol expressions. A Support Vector Machine (SVM) was employed as the classifier. To ensure stability for thin symbols (like horizontal bonds), coordinates were normalized using a "bounding square" approach rather than a standard rectangle.

Key Insights and Results

The CF44 feature set demonstrated robust performance:

  • Precision@1: 93.80%
  • Precision@5: 98.93%

Analysis revealed that Writer Independent (visual) features are more discriminative than Writer Dependent (temporal) features, achieving ~87% accuracy on their own compared to ~69% for WD features. This indicates that the final shape remains the most critical factor for recognition, even in trajectory-based systems. Furthermore, the addition of the two contextual features provided a significant boost, highlighting the importance of environmental awareness in chemical formula parsing.

Conclusion

The CF44 feature set offers a holistic approach to handwritten chemical symbol recognition. By combining the "how," "what," and "where" of handwriting, the system achieves high precision suitable for mobile chemical formula entry. Future work will focus on expanding the dataset and extending the system to handle more complex 2D chemical structures like benzene rings.

Summary updated

BibTeX
@inproceedings{tang2014chemical,
  author = {Peng Tang and Siu Cheung Hui and Chi-Wing Fu},
  title = {{Chemical Symbol Feature Set for Handwritten Chemical Symbol Recognition}},
  booktitle = {S+SSPR},
  year = {2014},
  url = {https://openreview.net/forum?id=ivawit8T0Kk},
}
Figure