Python

Robust Automatic Detection of a Document in an Image 

This project presents an approach for robust detection of documents in images taken with cameras. The proposed detection system combines variable image prepossessing, Harris corner detection, canny edge detection, Hough line transformation and a steepest ascent search algorithm to detect the page with increasing confidence in an iterative process. This approach is moderately successful with example images of documents that have a relatively high contrast to their background and are the main subject of the image. This approach outperforms other contour-based approaches.

full report on the process and results is contained in the GitHub repository here.


Process Summary

  1. Smoothing
  2. Closing
  3. Corner detection (Harris)
  4. Edge detection (Canny)
  5. Hough transform
  6. Hough line filtering
  7. Combine edge and corner data
  8. Detect possible page bounding rectangles
  9. Compute bounding rectangle confidence
  10. Optimise parameters to improve confidence and repeat from step 1
  11. Select highest confidence bounding rectangle


Experimental results

Under reasonable conditions this proposed process performs very well but can struggle in low contrast situations.
The following image shows the process at each stage:



For more detailed experimental results and analysis view the project report here.


GitHub Repository


https://github.com/ChrisSkorka/Perceptual-Computing-Project
Robust Automatic Detection of a Document in an Image - Report


Other Python Projects