Skip to main content
QUICK REVIEW

[Paper Review] Document Rectification and Illumination Correction using a Patch-based CNN

Xiaoyu Li, Bo Zhang|arXiv (Cornell University)|Sep 20, 2019
Advanced Vision and ImagingComputer Science35 references8 citations
TL;DR

This paper proposes a patch-based CNN method for single-image document rectification and illumination correction, leveraging local distortion flow estimation on overlapping image patches followed by gradient-domain stitching and a secondary illumination correction network. The approach achieves superior OCR accuracy and visual quality compared to prior methods, especially on complex distortions, using only 1,000 synthetic training images.

ABSTRACT

We propose a novel learning method to rectify document images with various distortion types from a single input image. As opposed to previous learning-based methods, our approach seeks to first learn the distortion flow on input image patches rather than the entire image. We then present a robust technique to stitch the patch results into the rectified document by processing in the gradient domain. Furthermore, we propose a second network to correct the uneven illumination, further improving the readability and OCR accuracy. Due to the less complex distortion present on the smaller image patches, our patch-based approach followed by stitching and illumination correction can significantly improve the overall accuracy in both the synthetic and real datasets.

Motivation & Objective

  • To address geometric distortions in single-view document images caused by perspective and physical deformation such as folding or curling.
  • To improve OCR accuracy by correcting uneven illumination and sampling artifacts in rectified documents.
  • To develop a deep learning method that generalizes well across diverse document types without requiring specialized hardware or multiple views.
  • To create a realistic synthetic dataset for training that captures complex lighting, textures, and deformations.
  • To outperform existing learning-based and non-learning-based methods in both rectification accuracy and robustness to real-world distortions.

Proposed method

  • The method partitions input document images into overlapping patches (25% overlap) to simplify local distortion learning.
  • A CNN is trained to predict local 2D displacement vector fields (distortion flows) for each patch, enabling localized geometric correction.
  • Patch results are stitched together using a gradient-domain fusion technique to minimize seams and preserve consistency across patch boundaries.
  • A second CNN is trained to correct non-uniform illumination and sampling artifacts in the stitched image, preserving color fidelity.
  • The training dataset is synthesized using 3D surface modeling, realistic texturing, dynamic lighting, and exposure simulation to enhance generalization.
  • The approach combines local flow prediction with global stitching and illumination correction to achieve high-quality, OCR-ready document images.

Experimental results

Research questions

  • RQ1Can a patch-based CNN approach outperform global flow learning for document image rectification under complex, spatially varying distortions?
  • RQ2Does gradient-domain stitching of patch-level rectified results lead to more consistent and visually plausible document images than direct global warping?
  • RQ3Can a dedicated illumination correction network significantly improve OCR accuracy beyond standard binarization techniques?
  • RQ4How does the method generalize to unseen document types, such as posters or music sheets, not included in the training data?
  • RQ5To what extent can a small synthetic dataset (1,000 images) achieve performance comparable to large-scale real-world datasets (e.g., 100k images)?

Key findings

  • The proposed patch-based method outperforms state-of-the-art methods, including Ma et al. (2018), on both synthetic and real-world datasets in terms of OCR accuracy and perceptual quality.
  • The method achieves superior results using only 1,000 synthetic training images, significantly outperforming a global learning method trained on 100,000 images.
  • Illumination correction improves both human readability and OCR accuracy, with the best performance achieved using the proposed dual-network setup.
  • The method generalizes well to unseen document types, including music sheets and posters, demonstrating robustness beyond the training distribution.
  • The gradient-domain stitching technique effectively reduces visible seams and artifacts, resulting in more consistent and natural-looking rectified images.
  • Limitations remain for extreme cases such as heavy crumpling, vintage handwritten documents, or highly reflective pages, where flow estimation becomes inaccurate.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.