A Complete OCR System for Gurmukhi Script

G. S. Lehal, Chandan SinghSSPR/SPR 2002

Introduction

While Optical Character Recognition (OCR) for Roman scripts reached maturity by the early 2000s, Indian scripts like Gurmukhi presented unique structural challenges. Gurmukhi, the primary script for the Punjabi language, is non-linear and features a "headline" (Shirorekha) that connects characters within a word. This paper presents the first complete OCR system for Gurmukhi, achieving over 97% accuracy through a specialized multi-stage pipeline.

The Structural Challenge of Gurmukhi

Gurmukhi text is organized into three distinct horizontal zones. Unlike English, where characters are typically separated by white space, Gurmukhi characters often touch or overlap vertically.

The three horizontal zones of a Gurmukhi word.

As shown in the figure above, the script is partitioned into:

  • Upper Zone: Contains vowel modifiers.
  • Middle Zone: Houses the main consonants and parts of vowels.
  • Lower Zone: Contains sub-joined characters and vowel signs at the "feet" of consonants.

Standard 1D segmentation algorithms fail because they cannot account for this vertical stacking and the connecting headline.

Methodology

The researchers developed a robust pipeline to address these complexities:

1. Preprocessing and Segmentation

After noise removal and skew correction, the system employs a novel Two-Dimensional Segmentation strategy. It dissects text into horizontal strips and uses statistical analysis to categorize them into the three zones. To handle characters connected by the Shirorekha, the system temporarily removes the headline, segments the remaining connected components, and then restores the headline for final recognition.

2. Feature Extraction and Classification

Classification occurs in two tiers:

  • Primary Features: Uses a binary tree based on structural elements (loops, sidebars) to narrow down candidates.
  • Secondary Features: Employs a Nearest Neighbor classifier using endpoint locations and profile depths for final identification.

3. Post-Processing

A Punjabi-language corpus is used to resolve ambiguities. If the engine identifies a character with low confidence, it cross-references the word against frequency lists and Punjabi grammar rules to correct common visual misidentifications.

Results and Discussion

The system was tested on 25 documents (approx. 30,000 characters) across 8 fonts and various sizes. The raw recognition accuracy was 94.35%, which improved to 97.34% after post-processing.

Despite these high marks, certain linguistic features remained problematic. Specifically, characters with a bindi (dot) or sub-joined signs often suffered during the thinning process, where cleaning algorithms accidentally merged or deleted these small but vital marks.

Examples of characters with dots/bindis, which represent a significant source of recognition error.

Conclusion

This pioneering work established a viable framework for Gurmukhi OCR. By treating the script as a multi-zonal structure and leveraging linguistic context, the system overcame the limitations of traditional 1D OCR. Future improvements will focus on refining thinning algorithms to preserve small features and enhancing robustness for low-quality source materials like newspapers.

Summary updated

BibTeX
@inproceedings{lehal2002complete,
  author = {G. S. Lehal and Chandan Singh},
  title = {{A Complete OCR System for Gurmukhi Script}},
  booktitle = {SSPR/SPR},
  year = {2002},
  doi = {10.1007/3-540-70659-3\_37},
}
Figure