You are here

Deskew

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!

Deskew, also called auto straighten, is the automatic rotation of an image such that the text is vertically aligned. This is great for cleaning up scanned documents.

http://www.cubewano.org/gimp-deskew-plugin/

GIMP Version: 
Code License: 

Comments

I tried installing this plugin in my 64-bit GIMP 2.8.10 for Windows installation. It didn't seem to work. Instead, try using the Rotate tool in "Corrective" mode. In corrective mode, align the gridlines so they are at the same slant as the text you are trying to straighten. Then rotate it. It's not automatic, but it works...

The Deskew plugin for Windows can be downloaded from http://tinyurl.com/bthrsef, or for the (justifiably) paranoid, a preview link: http://preview.tinyurl.com/bthrsef.

See http://registry.gimp.org/node/26003 for some recent comments. He observes instability even in seemingly unrelated plugin calls when deskew is installed.

He found deskew at http://www.huanix.com/2011/02/07/dividing-scanned-images-with-gimp-with-... but that site has disappeared. Where is a good site to find Deskew (for various architectures)?

Those comments were dated 2012 February 4.

Hello,

If you want to execute the deskew plugin on many pages, it's useful to use scripts.
Open a simple text editor, and put the following text:

(define (batch-deskew pattern)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let*
(
(filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE
filename filename)))
(drawable (car (gimp-image-get-active-layer image)))
)
(gimp-deskew-plugin 0 image drawable 0 0 0 0 0)
(gimp-layer-flatten drawable)

(gimp-file-save RUN-NONINTERACTIVE
image drawable filename filename)
(gimp-image-delete image)

)
(set! filelist (cdr filelist))
)
)
)

Then save the text as 'batch-deskew.scm' in the folder GIMP-2.0\share\gimp\2.0\scripts (this is the folder for the windows version, it may be different on others OS). Then run GIMP and launch the console (menu Filter->Script-Fu-> Console). Enter the following command : (batch-deskew "*.FileExtension") . The deskew plugin will be executed for all images with 'FileExtension' extension in the default image directory of the OS. For example, if i want to execute the plugin on bmp files, i enter (batch-deskew "*.bmp"). On Vista it will run on the \Images folder of the current user.

I am only a beginner with Gimp scripts. It should be possible to specify another folder than \Images when running the script, but i didn't test it.

Since the original website still doesn't work, I went ahead and put the code with some changes here:

https://github.com/prokoudine/gimp-deskew-plugin

The plug-in needs some more fixing, I'll try to do what I can. Feel free to send git formatted patches or pull requests :)

If you dont want to bother with extracting an rpm, an easier way is to download the 'deskew' plugin file from here: https://docs.google.com/leaf?id=0B_kEFWyVsTF-NTc1Mzg3NWEtMzRhYS00ZGRiLWE...
.. and just copy it to /usr/lib/gimp/2.0/plug-ins

You saved my day Nathan.

I was looking for the plugin too and I found the the source rpm is available at http://ccux-linux.de/pdb/index.php?pdetail=6271. Though I use Ubuntu I could simply extract the file gimp-deskew-plugin-1.1.tar.gz with file roller.

Thanks so much for that, saved me a lot of anxiety!!

Hi,

http://www.cubewano.org/gimp-deskew-plugin/ is down.

I have emailed the person who created the plugin, but am not sure if I will have any luck with that.
Would anyone be able to forward me a copy of their 'gimp-deskew-plugin', or point me to an alternative download site? I would REALLY appreciate it!

Thanks,
Nathan B

Pages

Subscribe to Comments for "Deskew"