I often scan text documents - text and possibly some logo/letterhead on a page, either entirely or mostly black-and-white. After scanning, I:
- Rotate the image to make sure the text is straight
(this could be an adaptive transformation in case the page isn't a proper straight surface, but I can't do that manually)
- Figure out the page limits
- Crop to the page limits
(sometimes a little further in for uniformity with other pages in the same sequence of scans)
- Adjust levels, to try to get the text to be black, its surrounding gradient stay grey, and the background be white with most noise becoming white.
- In some cases, do some manual spot/stain removal from the background.
- Avoid the level adjustment for regions such as photos printed on the page (which might get their own level adjustments).
Is there software for automating these tasks? For individual images and for batch processing of image files?
I am mainly interested in software on Linux (I work with Debian Stretch, Fedora 22 and Lubuntu 15.10 currently), but Windows solutions are also somewhat relevant. For the sake of discussion, there are no "budget limits" and commercial software is also relevant.
- I do not want or need text extraction, text recognition etc - that's a whole other kind of task (although not entirely unrelated I suppose).
- I don't necessarily need everything I listed above. The idea is for me to be able to put the results together into a PDF, send it around and for it to be pleasingly readable. The more I can fix it up the better of course.