How To Straighten Skewed Text In A Scanned Document

Editor Ratings:
User Ratings:
[Total: 0   Average: 0/5]

This tutorial explains how to straighten skewed text in a scanned document.

You must have downloaded a scanned document or received a document in an email with text rotated to some angle. Manually, it’s very difficult to fix that skewed text. However, there is a very useful command line tool, called “Deskew“, which can help you set the rotation angle and generate the output document with straight text.

Using this tool is also very simple. You can execute a command which contains input and output file locations, rotation angle, the background color for output and other options (if you wish). After that, you will find that the output scanned document has straight text.

straighten skewed text before and after comparison

Above you can see the comparison between the skewed and the text straightened by me using this command line tool.

You must also be interested to check these free OCR software.

How To Straighten Skewed Text In A Scanned Document?

Step 1: Download this Deskew command line tool. You can use this link to download it.

Step 2: Open Command Prompt window and drop the application file of this tool there. After that, you can write -h and press enter to explore all the options (like angle, color, output, etc.) that you can use in command to generate the output document. So your command would be like “deskew.exe -h“:

explore options

You will also be able to check the list of input and output image formats supported by this tool. Some of the supported formats are: BMP, TGA, GIF, PPM, PAM, TIF, JPG, PSD, etc.

Step 3: Now to straighten a skewed text, you need to enter the full command like “deskew.exe -a 15 -t a -b color hex code -o [output file path along with file format] [input file path along with file format]“. Here, “-a” is used for angle command (you can set angle value as per your need), “-o” for the output file, -b for background color and -t for the threshold.

execute the command

Execute the command and it will process the input document. After completing the processing, you can check the output document. You will notice that the output document has straight text.

The Verdict:

I really like this command line tool a lot. You don’t have to struggle to execute the command properly. I hope this tutorial will surely help you run the command and straighten a skewed text. Go ahead and try this.

Get this tool.

Editor Ratings:
User Ratings:
[Total: 0   Average: 0/5]
Works With: Windows
Free/Paid: Free