Use of scripts to deskew and crop scans of booklets - Imagemagick?

Anyone use scripts or automation to tidy up scans of booklets?
They need to be

  • level / de skewed. It’s very hard to get them level on a scanner
  • cropped to remove the background of the scanner or backing paper
  • all the same size

Maybe slice images in two to get one page per image.

Have been trying this example, Deskew and crop but the results are not quite good enough - leaves a blank area on right, not cropped and it’s not aligned perfectly.

Wondering if anyone has any command line that they can share or an alternative? Doing it manually is not practical

2 Likes

Looks like you’re not using Photoshop, but in case someone else is searching for this in future and is, the Photoshop function is built in: File > Automate > Crop and Straighten Photos

Needs to be used with a bit of caution as it sometimes crops images too tight.

1 Like

I’m open to using any solution that works and is automated… will it handle 10
images?

10 separate items in the same scan? I haven’t really tested the limits, but it can do at least ten.

no, 10 images from the
scan of 10 seperate pages, all cropped to the same size so they display without jumps

Hmm, it doesn’t have any options to set the size. If you’re scanning them all with the same settings they should be the same size?

If you have to/want to do it manually (edit: I meant do it manually, but with automation :stuck_out_tongue: ) I would do that in a separate step. Photoshop ‘droplets’ automate any sequence of Photoshop actions, and then you you can drag lots of images onto a droplet to carry them out. For instance, here the actions would be ‘resize to x > save > close’. If that sounds appealing then I would look for ‘Photoshop droplet’ tutorials on YouTube.

Pretty much, but they need to be exact if you want to be able to flip through the pages on a large display…

Yes, thanks. But I don’t want to do it manually… looking for automation…