Image credit: Nicholas Moreau at WikiMedia

Jun 23, 2010

GIMP Deskew plugin

When you're scanning hard copy, you inevitably wind up with the image skewed at some perceptible degree, but it's really really hard (and slow!) trying to use GIMP's arbitrary rotation to de-skew the image. So I went looking for auto-rotate/de-skew plugins. I found two:
http://registry.gimp.org/node/22910 (which I haven't tried), and
http://registry.gimp.org/node/2958 (which I used).

The first one apparently requires you to draw a vector (path) to show it what should be perfectly horizontal, in the image. That's more work, and is slower, so I tried the other one first. Caveats:
  • the second is a compiled ELF binary ("deskew: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped") so it isn't very portable.
  • The first link in the plugin registry page apparently doesn't work, as per comments below - so I tried the Google Docs link, which allowed me to download the binary.
I chucked it in ~/.gimp-2.6/plug-ins and did a chmod u+x deskew (which is required for GIMP to exec it as a plugin). On starting GIMP and opening the scanned image, though, I couldn't find the plugin's menu option. That reminded me of the GIMP Procedure Browser on the help menu, so I went to the Help menu trying to find if it had loaded. It was here that I discovered something new (at any rate, I'm seeing it for the first time!): Plug-In Browser! Yup, it lists all loaded plugins, and lets you search them - and shows you where in GIMP's huge menus you can find the plugin's menu... :-) Nice!

Having found that it was at Filters > Misc > Deskew, I ran the filter. It works, and works well - straightened my image beautifully, without requiring any more interaction on my part! Now to crop the image and get on with the rest of my work on it :-)

No comments:

Post a Comment