Deskew icon
Deskew icon

Deskew

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 detected lines are horizontal. It is a command line tool for Windows, Linux, and Mac.

Cost / License

  • Free
  • Open Source

Platforms

  • Mac
  • Windows
  • Linux
-
No reviews
2likes
2comments
0news articles

Features

Suggest and vote on features
  1.  Image Processing

 Tags

  • rotating

Deskew News & Activities

Highlights All activities

Recent activities

No activities found.

Deskew information

  • Developed by

    CZ flagMarek Mauder
  • Licensing

    Open Source and Free product.
  • Alternatives

    5 alternatives listed
  • Supported Languages

    • English

Our users have written 2 comments and reviews about Deskew, and it has gotten 2 likes

Deskew was added to AlternativeTo by Archipel on and this page was last updated . Deskew is sometimes referred to as Deskew Tools

Comments and Reviews

   
 Post comment/review
Top Positive Comment
Archipel
0

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:

deskew -b FFFFFF -a 10 -f g8 -o ImageOut/Output_001.tif ../ImageIn/Input_001.tif
deskew -b FFFFFF -a 10 -f g8 -o ImageOut/Output_002.tif ../ImageIn/Input_002.tif
deskew -b FFFFFF -a 10 -f g8 -o ImageOut/Output_003.tif ../ImageIn/Input_003.tif

etc, etc., up to

deskew -b FFFFFF -a 10 -f g8 -o ImageOut/Output_800.tif ../ImageIn/Input_800.tif

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


In C:\Users\yourname\Pictures\Deskew\Deskew\Bin, create a folder:
ImageOut
In other words: ```
C:\Users\yourname\Pictures\Deskew\Deskew\Bin\ImageOut
``` (That _IS_ in the \Bin directory).

Copy all the files to be deskewed into the ImageIn folder.
Rename them ```
Input_001.tif
Input_002.tif
``` etc (use e.g. the Irfanview "Batch Rename" command).

Run Deskew.bat

Collect the deskewed images from the ImageOut folder. 

I should note that the Deskew.bat file sits in the \Bin directory.

Given the primitive interface, this seems to me to be the best way to work with Deskew. It would be great if the code found its way into Irfanview, which would make it all so much easier, but for now, it is what it is.
Top Negative Comment
irpio
0

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.

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