Skip to content

tony-xlh/deskew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deskew

A collection of document deskewing methods.

  • index.html. A web document scanning app based on Dynamic Web TWAIN which provides document images deskewing.
  • run-magick.bat. Deskew document images using ImageMagick.
  • run-python.py. Deskew document images using Python + OpenCV.

Delve into Deskewing

Here are the steps using image processing to deskew document images based on text lines.

  1. Normalize the image with the following operations:
    • Blur
    • Resize
    • Crop border
    • Grayscale
    • Invert
    • Threshold
  2. Find countours based on the binary image.
  3. Get the rotation angle of every contours and use the median as the skewed angle.
  4. Run affine transformation to get the deskewed image.

You can find the corresponding code in the py file.

About

A collection of document deskewing methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published