Deskew is a tool for auto-straightening or deskewing scanned text documents. Deskew detects the orientation of text lines in the image. It rotates the image so the detec...
- Free • Open Source
What is Deskew?
Deskew is a tool for batch deskewing (auto-straightening) scanned text documents. Deskewing is a term used for fixing the scans to get the lines of text straight. That means rotating the image of the scanned page to compensate for the misalignment of the paper in the scanner.
Deskew uses Hough transform to detect “text lines” in the image and their orientation. As an output, you get an image rotated so that the detected lines are horizontal.
At the moment, Deskew is a command line tool for Windows, Linux, and Mac. As at November 2016, it is at version 1.20, with development still continuing. Source code is at Bitbucket as "App-Deskew". It is maintained by the developer, Marek Mauder.
Supported file formats Input: BMP, JPG, PNG, JNG, GIF, DDS, TGA, PBM, PGM, PPM, PAM, PFM, PSD, TIF Output: BMP, JPG, PNG, JNG, GIF, DDS, TGA, PGM, PPM, PAM, PFM, PSD, TIF
Comments and Reviews
Said about Deskew as an alternative
Post processing of scanned images
- Image Editor
CategoryPhotos & Graphics
Recent user activities on Deskew
- Archipel3 liked DeskewAr
- a2ohm added Deskew as alternative(s) to ScanTailor Advanced
- irpio reviewed DeskewirTheoretically, this is ideal for straightening ("deskewing") large amounts of scanned pages, i.e. images with some straight lines of text. It does its job of automatically rotating thes images to the right degree excellently. Unfortunately, the quality of the output images is not that excellent. The resolution is diminished and blur is introduced. I tried to follow the author's suggestion to convert to png instead of jpg, but it made no difference.
Deskew produces great results. The downside is that it does not have a graphical user interface.
I use Deskew a lot, for bulk processing of pages from scanned hardcopy reports and books, as a preparation step for uploading these to archive.org. What I have found easiest to do is to have a single batch file set up that I use for everything I run through Deskew.
FIRST, write a batch file in a text editor exactly like this:
etc, etc., up to
Name the batch file "Deskew.bat" You can use a spreadsheet to step the filename numbering up by one on each line. Make it go up to 800 or so, so that it can handle practically all books, i.e. so Deskew can batch process up to 800 pages (or whatever you like). It doesn't matter if there are less input images than lines in the batch file; in other words, even if you only run the batch file on a directory with five images in it, it will terminate itself once those images are done, ignoring the other 795 'empty' lines in the 800-line batch file. The batch file I show here is set up to convert images to greyscale (that's the switch "-f g8"). If you don't want that, set the switch as "-f rgb24" for colour, or "-f b1" for black+white, or you could just omit the -f switch altogether if input and output are always to be the same. A full list of switches can be found at bitbucket.org/galfar/app-deskew. I have also assumed you will do all your image processing as tiff, but other formats are possible.
SECOND, Unpack the Deskew zip file you downloaded to a convenient directory (the following example for Windows I assume you will unpack it into a subdirectory of Pictures). You then need to create two folders (read this bit carefully):
In C:\Users\yourname\Pictures\Deskew\Deskew, create a folder: ImageIn In other words: ``` C:\Users\yourname\Pictures\Deskew\Deskew\ImageIn
Theoretically, this is ideal for straightening ("deskewing") large amounts of scanned pages, i.e. images with some straight lines of text. It does its job of automatically rotating thes images to the right degree excellently. Unfortunately, the quality of the output images is not that excellent. The resolution is diminished and blur is introduced. I tried to follow the author's suggestion to convert to png instead of jpg, but it made no difference.