TL;DR
This paper introduces a novel method for detecting page frames in complex historical documents, a crucial preprocessing step for accurate Optical Character Recognition (OCR). By effectively removing noisy borders and artifacts, their approach significantly improves OCR accuracy on challenging historical texts.
What Problem Does This Paper Address?
Digitizing historical documents is vital for preserving and accessing our past, but it's a far more complex task than digitizing modern texts. Historical documents often suffer from poor image quality, damaged pages, and extraneous noise like black borders, speckles, and even rulers. This "noise" can severely degrade the performance of standard OCR systems, leading to inaccurate transcriptions. While existing OCR systems are optimized for contemporary documents, they struggle with the unique challenges presented by historical archives. Specifically, accurately identifying the actual content area of a page, free from these noisy borders, is a significant hurdle.
Methods
The authors propose a two-pronged approach to page frame detection:
- Morphological Transforms and Geometric Matching:
- Noisy Ruler Removal: The process begins with binarization and deskewing of the document image. Then, OpenCV's contour detection is employed to identify potential ruler shapes. A ruler is characterized by its rectangular form and specific aspect ratio (height:width between 10:3 or 3:10) and a size relative to the document (30% to 1% of the document area). Once identified, these ruler areas are filled with white pixels, effectively removing them.
- Text Area Detection: Following ruler removal, morphological transformations (specifically, gradient and close operations) are used to detect the outlines of text objects and clean up small holes within foreground objects. This helps in creating a more robust representation of text areas.
- Page Frame Construction: Text bounding boxes are then merged column-wise based on their proximity and size relative to the image. Heuristic geometric calculations are used to decide whether to merge or remove columns to isolate the main content area.
- Line Segment Detector (LSD):
- This is an alternative approach used when the first method is insufficient. It leverages the LSD algorithm to detect all possible line segments in the image. Lines longer than 45 pixels and located within a defined border region (25% from left/right, 40% from top/bottom) are considered potential boundary lines. If three such lines are found closely together (within a 15-pixel difference), they are identified as the page boundary. The final page frame is then obtained by cropping the image based on these detected boundaries.
Datasets
- OCR-D historical dataset: This dataset consists of 124 scanned historical document images from the 16th to 19th centuries. 10 images were used for training (parameter optimization), and 114 for testing.
- UW-III dataset: This dataset comprises 74 contemporary document images, used to evaluate the method's performance on modern texts. 14 images were used for training, and 60 for testing.
Key Insights and Ideas
- Historical documents are fundamentally different: The paper strongly emphasizes that historical documents present unique challenges not adequately addressed by methods designed for contemporary texts. The nature and prevalence of noise are significantly different.
- Rulers are a specific, challenging noise: The identification and removal of rulers are highlighted as a critical step, as they can be mistaken for text or structural elements by standard OCR.
- A two-stage approach offers robustness: The combination of morphological/geometric methods and the LSD approach provides flexibility and robustness, allowing the system to handle different types of noise and document layouts.
- Page frame detection directly impacts OCR: The core idea is that accurately defining the content area before OCR is a more effective strategy than trying to clean up OCR errors afterward.
Key Results
The proposed page frame detection method demonstrated significant improvements in OCR accuracy:
- Historical Documents (OCR-D dataset): OCR accuracy increased from 78.98% to 83.47% (an improvement of 4.49%).
- Contemporary Documents (UW-III dataset): OCR accuracy improved from 84.75% to 91.44% (an improvement of 6.69%).
The authors also note that their method is effective in removing various types of noise, including textual noise from neighboring pages and non-textual noise like borders and speckles.
Limitations and Future Work
- Limitations:
- The paper acknowledges that the proposed method is not a universal solution and that some historical documents may still present challenges.
- The authors were unable to fully test their method with the ABBYY online OCR system due to limitations in its Fraktur language model support for historical documents.
- The paper doesn't explicitly detail the computational complexity or processing time of their methods.
- Future Work:
- The authors suggest that their work provides a foundation for handling more complex historical documents with multiple page borders and unexpected objects.
- Further research could explore more advanced techniques for noise removal and page frame detection, potentially incorporating deep learning approaches.
- Expanding the evaluation to a wider range of historical document types and languages would be beneficial.
Summary updated