We're now ready to begin processing these scans, making sure that each scan is oriented in a perfectly horizontal or vertical fashion and appropriately cropped. We've settled on using ImageMagick to help automate the task due to its versatility, active community, and strong reputation among fellow archivists. After reading through this forum, searching the web, and playing with ImageMagick ourselves, we still have several unanswered questions:
- What is the best way to programmatically remove (or mask with black) the portions of a scan that aren't a part of the original film frame?
- What is the best way to programmatically detect and then correct a slight rotation (usually within +/- 2 degrees) of the film frame?
- What is the best way to programmatically crop the scan such that the film frame is cleanly isolated from the mask with minimal wastage?
We've found the resources at http://www.fmwconcepts.com/imagemagick/ to be exceptionally well-written, and have had success using the unrotate script for #2. We also suspect the innercrop script from the same website will work well for #3, but have not tested it. But what about #1? And, taking a step back, is there a better way to do what we want to do?
OS: Linux 3.10.0-327.10.1.el7.x86_64
ImageMagick: ImageMagick 6.9.5-5 Q16 x86_64 2016-08-08