How to straighten round-edge document or book page automatically?

I have hundreds of documents, which are rounded: the document was not straight when it was photographed, and the image is curved or rounded in various ways.

I’m looking for an automatic or semi-automatic process, that will

  • detect the lines (not OCR, just line curves),
  • straighten the whole page according to the (assumed) text lines.

Can you point me a software or feature, or even code that tries to fix this?

example attached (original):

enter image description here

after an (imperfect) manual fix (gimp, cage transformation):

enter image description here


Free experimental program Scan Tailor made this:

enter image description here

The shown image used automatic dewarping. It really seems to reduce curvature substantially with no effort.

There is also manual dewarping grid which felt very responsive an gave better results:

enter image description here

enter image description here

The program asks in the beginning which folder contains the page scans that should be straightened and is the writing European or something like Hebrew or Arabic.

The process is semiautomatic, for every page one must select the interesting area, margins and possibly needed rotation & skewing or accept automatic guesses.

I have not tried the program for any big projects, only tested it for separate page scans. It’s available here

Source : Link , Question Author : Berry Tsakala , Answer Author : user287001

Leave a Comment