We just deskewed all over the place.
brew install leptonica
git clone [email protected]:TyGuy/deskew_text.git
make clean && make
# ./deskew <filename_base>
# NOTE: .png file extension is assumed, don't add it
./deskew sample_image
real simple, just edit files, run make, then the executable.
Make usage easier:
- don't assume png, make it so you pass in full file name, and just ensure it's a raster image.
- print more helpful text
- let user customize it more (right now skew angle assumed between -45 and 45 degrees)
Other Ideas:
- de-warp
- use otsu threshold for binarization instead of
Jeff Rafter, Tyler Davis
MIT