When migrating images there are several tools available that can improve the quality of your images before you import them into Imago. With historic imagery taken without a fixed camera support images are commonly rotated a few degrees from the horizon. This can be a challenge when you want to crop them.
There are several tools that can help you auto rotate your images so they are aligned with the horizon automatically. My favorite is Image Magick. Here is a quick tutorial on how to use the deskew function, the structure of the command is:
magick [input_file] -deskew 40% [output_file]
You will need to run the command from the command line and specify the full path to the input and output files in case they are not in the location of your command prompt
For the example below my input files are in E:\migrations directory
magick "A1 0 2.5.jpg" -deskew 40% A1_0_2.5.jpg
This is what the input file looks like:
This is what the transformed file looks like:
Because image magick uses a command line interface you can automate the execution of the command on any number of images. You can construct the command in Excel by concatenating a file with the listing of the images.
To get a directory listing of the images in a folder use the following windows command:
dir /B /S *.jpg > output.csv
you can also do it with a bat file like so: autoprepare.bat
Comments
0 comments
Please sign in to leave a comment.