A New Algorithm for Detecting Text Line in Handwritten Documents

Yi Li, Yefeng Zheng, David Doermann, Stefan Jaeger2006

TL;DR

This paper introduces a novel algorithm for detecting text lines in handwritten documents, a crucial step for handwriting recognition. By treating text line detection as an image segmentation problem and employing a level set method enhanced by Gaussian smoothing, the authors achieve high accuracy across various scripts and document types, outperforming existing connected component-based methods.

What Problem Does This Paper Address?

Accurately identifying and segmenting text lines is a fundamental challenge in analyzing handwritten documents. Unlike machine-printed text, handwritten lines are often curvilinear, irregularly spaced, and can vary significantly in orientation and style. Existing methods, often designed for cleaner, machine-printed text, struggle with this variability. The ability to reliably segment text lines is essential for subsequent tasks like skew correction, zone segmentation, and ultimately, character recognition. This paper aims to bridge this gap by proposing a robust, script-independent method for handwritten text line detection.

Methods

The proposed algorithm models text line detection as an image segmentation problem. The core of the method involves:

  1. Image Enhancement: A binary input image is converted to a grayscale image using Gaussian smoothing with a rectangular window. This process enhances the text line structure by blurring individual strokes while preserving the gaps between lines. The resulting image, IMaug, has dark intensities on text lines and light intensities in gaps.
  2. Level Set Method: The enhanced grayscale image is then used with a level set method for segmentation. The level set method is an effective technique for evolving boundaries and naturally handles topological changes, making it suitable for segmenting complex shapes like curvilinear text lines.
  3. The initial estimate of text lines is obtained by binarizing IMaug.
  4. This initial estimate is used to initialize an implicit function representing the text line boundary.
  5. The level set function is evolved using a partial differential equation (PDE). In this approach, IMaug acts as the "speed" term, guiding the boundary to grow faster within text lines.
  6. Post-processing: After the level set evolution, text lines might be fragmented due to large gaps between words. A post-processing step is employed to:
  7. Calculate the orientation and length of each segment.
  8. Merge compatible, adjacent segments based on orientation and proximity.
  9. Group isolated connected components to their closest major text line.

Datasets

The paper mentions testing the algorithm on "more than 10,000 heterogeneous handwritten documents in different scripts, such as Arabic, Hindi, and Chinese." For quantitative evaluation, they "ground-truthed 100 handwritten Arabic documents using the VIPER Ground Truth Editor." They also tested on machine-printed documents. No new datasets were introduced.

Key Insights and Ideas

  • Treating text lines as segmentation problems: This reframes the task from a purely geometric or statistical approach to one that leverages powerful image segmentation techniques.
  • Gaussian smoothing for structure enhancement: The clever use of Gaussian smoothing to enhance text line structure while preserving gaps is key to making the level set method effective for this specific problem. It creates a more amenable input for segmentation.
  • Level set method's adaptability: The inherent ability of level sets to handle topological changes (merging, splitting) makes them ideal for the complex and often broken nature of handwritten text lines.
  • Script independence: The method's reliance on image structure rather than specific script characteristics allows it to perform well across diverse languages.

Key Results

  • High Accuracy: The proposed method achieved a 92% hit rate on handwritten Arabic documents, significantly outperforming a connected component-based method which achieved 66%.
  • Text Line Level Accuracy: At the text line level, the algorithm correctly detected 85.6% of ground-truthed lines, compared to 35.3% for the connected component method.
  • Robustness: The algorithm demonstrated robustness to:
  • Scripts: Similar performance across Arabic, Chinese, Cyn, Hindi, and Thai.
  • Orientations: Performance degraded minimally for skew angles within ±10°.
  • Character Sizes: Consistent results across different scales.
  • Noise: Reasonable performance even with moderate levels of noise.
  • Machine Printed Documents: The algorithm showed comparable performance to traditional methods on machine-printed documents and could handle complex layouts.

Limitations and Future Work

  • Overlapping Text Lines: The paper acknowledges that significant overlap between neighboring text lines is a primary cause of failure.
  • Signatures and Noise: Signatures, corrections within gaps, and severe scanning noise can also lead to segmentation errors.
  • Future Work: The authors suggest that post-processing to segment overlapping lines horizontally would be necessary to improve performance in such cases. They also imply that further refinement of the post-processing steps could address some of the identified failure cases.

Summary updated

Abstract

Curvilinear text line detection and segmentation in handwritten documents is a significant challenge for handwriting recognition. Given no prior knowledge of script, we model text line detection as an image segmentation problem by enhancing text line structure using a Gaussian window, and adopting the level set method to evolve text line boundaries. Experiments show that the proposed method achieves high accuracy for detecting text lines in both handwritten and machine printed documents with many scripts.
BibTeX
@misc{li2006new,
  author = {Yi Li and Yefeng Zheng and David Doermann and Stefan Jaeger},
  title = {{A New Algorithm for Detecting Text Line in Handwritten Documents}},
  year = {2006},
}
Figure