fixes rotated images so they can be fed to an OCR program
CSS JavaScript HTML Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
presentation
README.md
lgpl-3.0.txt
ocrprep.py
skew.jpg
skew_fix.jpg

README.md

OCRprep

ocrprep prepares photos taken in less than optimal conditions for optical character recognition.

ocrprep is licensed under the LGPL http://www.gnu.org/licenses/lgpl-3.0.txt

We use OpenCV for almost everything

  1. adaptive thresholding fixes lighting issue that can occur when using camera phones
  2. clean up noisy images using edge preserving median blur, dilation and erosion
  3. The hough transform finds lines formed by rows of text
  4. Once we know what the lines look like, we can calculate the degree of rotation
  5. OpenCV will build a rotation matrix for us given a point around which to rotate, and the angle