Hello all,
I just started the process of scanning an old family archive of Kodak Discs. They are unwieldy as hell to scan, and the best/quickest way I have found so far is to use a good flatbed and scan them at once in the highest resolution. So I end up with a large 16000x16000 pixels scan which I would like to cut up automatically into 15 separate smaller DNGs (of approx 1500x2000 pixels) with the appropriate rotations.
I regularly use IM for simple conversions, but I've never tried more advanced scripts and would like a few pointers on what needs to be done. Here's the basic algorithm:
1 - find the center of the disk (not necessarily the center of the scan).
2 - find the outer dimensions of the disk.
3 - find the angle of a (random) first image and rotate to that.
4 - find the borders of the first image (there's actually a white border on each one)
5 - crop and save to first dng file
6 - rotate by 360/15 degrees and repeat steps 4-6 on the next 14 images.
Now the first 3 steps involve some kind of image analysis and I have no idea if that is at all possible with IM.
If that is too difficult, a script that would take as input: centerX, centerY, diameter and first rotation would be fine. Can a script like that be done entirely in IM, or is it better to do a small shell script and call IM 15 times ?
Thank you for the suggestions.
IM script for Kodak Disc scans
Re: IM script for Kodak Disc scans
There were no replies here, but I received helpful advice to the several more pointed questions I asked in separate posts. So here is the result: a shell script based on IM that will split a raw Kodak Disc scan into its 15 constituent images.
Feel free to comment as this is the most complex IM script I have written so far and I'm sure it can be improved.
Feel free to comment as this is the most complex IM script I have written so far and I'm sure it can be improved.