Text Line Extraction

Abstract

A very important step in the handwriting recognition process is that of text line extraction: it aims at extracting individual text lines from the text regions of the manuscript page. In this work, we propose a novel text line extraction algorithm for color manuscript pages without prior binarization. Our algorithm is based on seam carving to compute separating seams between text lines. However, unconstrained seam carving has the tendency to produce seams that move through gaps between multiple text lines, if these are the lowest energy regions of the neighboring image space. We constrain the seam carving computation between two consecutive text lines and therefore, we are able to generate separating seams that correctly separate text lines. 

Datasets and Results

We evaluate our algorithm on the original manuscript pages of the work Aline by the Swiss-French writer Charles-Ferdinand Ramuz. We obtained it from the Bibliothèque Cantonale et Universitaire de Lausanne (BCU). Due to copyright reasons, the manuscript pages are not available online. 

In order to show the applicability of our method to diverse manuscripts, we also apply our algorithm to the dataset of [1], which is organized in four collections and contains 215 manuscript pages in English, Spanish and Arabic. Furthermore, we apply our algorithm to a smaller dataset that was provided to us by the authors of [1]. In all cases, we outperform the state-of-the-art algorithm of [1]. See our paper [pdf] for more details.

The code of our algorithm to reproduce the results in our paper together with generated seams on the dataset of [1] are available below. For any questions regarding the code or the results, please contact Nikolaos Arvanitopoulos ([email protected])

Paper (Infoscience link) [pdf]
MATLAB Code: text_line_extraction_code.zip
Seam results: seam_results.zip

Below we show a result of our algorithm. In red we show the seams that separate two consecutive text lines from each other. In blue, we show the seams that approximate the medial axis of each text line.

References

[1] R. Saabni, A. Asi, and J. El-Sana, “Text line extraction for historical document images”, Pattern Recognition Letters, vol. 35, no. 0, pp. 23-33, 2014.

[2] S. Avidan and A. Shamir, “Seam Carving for Content-Aware Image Resizing”, ACM Transactions on Graphics, vol. 26, no. 3, p. 10, 2007.

[3] M. Liwicki, E. Indermühle, and H. Bunke, “On-line handwritten text line detection using dynamic programming”, International Conference on Document Analysis and Recognition, vol. 1, pp. 447-451, 2007.