Morphological filters for OCR: a performance comparison

Laurent Mennillo, Jean Cousty, Laurent NajmanHAL 2012

TL;DR

This paper explores how different morphological filters can improve Optical Character Recognition (OCR) performance on degraded documents. By comparing filters operating in complex, graph, and vertex spaces, the authors found that complex and area filters generally offer the best balance of accuracy and denoising capabilities for OCR preprocessing.

What Problem Does This Paper Address?

Optical Character Recognition (OCR) systems often struggle with degraded documents, which can result from scanning, printing, or photocopying. These degradations introduce noise, blurring, and other distortions that significantly reduce OCR accuracy. While various image processing techniques exist to mitigate these issues, this paper specifically investigates the effectiveness of morphological filters, which are well-suited for shape and structure analysis, in improving OCR performance on both binary and grayscale images. The authors aim to compare the performance of different types of morphological filters across various degradation levels and image types.

Methods

The authors propose and evaluate several morphological filters operating in different mathematical spaces:

  • Simplicial Complex Spaces: This approach models images as collections of simplices (points, line segments, triangles, etc.) and defines morphological operators (dilation, erosion, opening, closing) on these structures.
  • Graph Spaces: Similar to simplicial complexes, this method represents images as graphs, with vertices and edges, and applies morphological operators within this framework.
  • Vertex Spaces: This is a simplified approach that focuses on the pixel neighborhood without explicitly using graph or complex structures, essentially acting on local pixel relationships.
  • Area Opening and Closing Filters: These filters are designed to remove or preserve regions based on their size (area), offering a different approach to noise reduction.

The core of their methodology involves:

  1. Document Degradation: Simulating realistic document degradations (pixel inversion, blurring, Gaussian noise) at various levels.
  2. Filtering: Applying the aforementioned morphological filters to the degraded documents.
  3. OCR Analysis: Using the Tesseract OCR engine to recognize characters and words from the filtered images.
  4. Performance Evaluation: Measuring OCR accuracy (character and word accuracy) and Mean Squared Error (MSE) to assess denoising capabilities.

Datasets

The paper uses a combination of datasets:

  • Binary Documents: A selection of 100 binary documents from the UNLV-ISRI dataset, which are scanned versions of real documents and inherently contain some imperfections.
  • Greyscale Documents: Two generated greyscale documents were created to evaluate filter performance on different image types.

No new benchmarks were introduced; the study utilizes existing datasets and OCR tools.

Key Insights and Ideas

  • Filter Space Matters: The choice of mathematical space (simplicial complex, graph, vertex) significantly impacts filter performance for OCR. Complex and graph-based filters, which capture more structural information, generally perform better than simpler vertex-based approaches.
  • Complex and Area Filters Shine: Complex and area morphological filters consistently demonstrated good overall performance in improving OCR accuracy and denoising capabilities across various degradation levels and image types.
  • Inversion Impact: For binary documents, filtering non-inverted images generally yields better results for complex and area filters, while graph and vertex filters perform better on inverted documents.
  • Scaling and Thresholding Trade-offs: Upscaling binary documents for filtering, followed by downscaling and thresholding, can introduce artifacts that negatively impact certain filters (like graph filters) while potentially benefiting others.
  • MSE vs. Accuracy: While MSE measures denoising effectiveness, it doesn't always directly correlate with OCR accuracy, highlighting the need for task-specific evaluation.

Key Results

  • Binary Documents: Complex filtering on non-inverted documents at original resolution achieved the best character accuracy. Vertex filtering at triple resolution outperformed complex filtering for word accuracy, though it was slower.
  • Greyscale Documents: Complex filtering generally performed better than graph and vertex filtering at original resolution. Area filtering showed a slight advantage in these conditions. At scaled resolutions, graph filtering led, followed by vertex and area filtering.
  • MSE Performance: Complex and area filters showed good denoising abilities, often performing comparably. Graph filtering at scaled resolution was also competitive in MSE.
  • Computational Cost: While some filters (e.g., vertex filtering at higher resolutions) achieved good accuracy, they came with a higher computational cost.

Limitations and Future Work

  • Computational Time: The paper notes that some filters, particularly vertex filtering at higher resolutions, are significantly slower than others, suggesting a trade-off between accuracy and speed.
  • Impact of Thresholding: The authors acknowledge that the thresholding operations performed on upscaled binary documents in the first test protocol might have affected the results, particularly for graph filters.
  • Filter Strengths and Weaknesses: The authors conclude that each filter has its own strengths and weaknesses. Complex filtering is recommended for binary documents with large structures, while area filtering is better suited for greyscale documents with small structures.
  • Future Work: The paper doesn't explicitly detail future work, but the findings suggest further investigation into optimizing filter parameters, exploring hybrid filtering approaches, and developing more efficient implementations for complex and graph-based filters. The impact of different scaling and thresholding strategies could also be a fruitful area for future research.

Summary updated

BibTeX
@inproceedings{mennillo2012morphological,
  author = {Laurent Mennillo and Jean Cousty and Laurent Najman},
  title = {{Morphological filters for OCR: a performance comparison}},
  booktitle = {HAL},
  year = {2012},
}
Figure