Automatic crop and rotate scans?

Automatic crop and rotate scans?

Nadav Har'El nyh at math.technion.ac.il
Tue May 3 10:42:18 IDT 2011


Hi,

I have a flatbed scanner (by HP) attached to my Linux machine, and I often
need to scan rectangular items such as photographs, CD inserts, and the
occasional piece of paper.

At the moment, I follow a tedious manual process to do that: The scanner
generates a big image of everything it sees on glass window, and then using
Gimp I manually rotate the image (because I can't place it on the window with
100% precision) and then crop it to the rectangle.

Supposedly, Photoshop has an "Automate->Crop and Straighten Photos"  feature
(see http://www.photoshopessentials.com/photo-editing/crop-straighten/)
but I couldn't find such a feature in Gimp.

I was really surprised that I couldn't easily find some program to do this
automatically: The program would recognize (using a relatively simple algorithm)
the foreground rectangle in the image, rotate it to be perfectly horizontal,
and then crop the image to it.

Does anyone know of such a program? Obviously, it needs to be free software
running on Linux. Bonus points if it's a command line program (a la netpbm
or imagemagick) and not an "integrated" GUI program. Extra bonus points if
it's a pipeline of netpbm or netpbm-like tools :-) But any other sort of
(free) solution would also be acceptable.

Thanks,
Nadav.

-- 
Nadav Har'El                        |      Tuesday, May  3 2011, 29 Nisan 5771
nyh at math.technion.ac.il             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |Sign seen in restaurant: We Reserve The
http://nadav.harel.org.il           |Right To Serve Refuse To Anyone!



More information about the Linux-il mailing list