- Download imagick:
http://www.imagemagick.org/download/binaries/ImageMagick-6.8.9-8-Q16-x86-windows.zip
Extract to folder (e.g.) : c:\programs\imagick\
- In the directory with the images (.jpg) to straighten, create (and run) bat file containing:
for %%f in (*.jpg) do c:\programs\imagick\convert.exe %%f -distort barrel “0.01152 0.01061 -0.38333” flat_%%f
- The correction parameters you wish to have, can be obtained in several ways…
Here: https://vimeo.com/51999287 is an example (tutorial) of a plugin for the program hugin and photographed grid array test.
- If you want to start to trim images in one step, then you need to add an option to the previous script:
-crop XxY+DX+DY
e.g.:
for %%f in (*.jpg) do c:\programs\imagick\convert.exe %%f -distort barrel “0.01152 0.01061 -0.38333” -crop 1000x1000+1692+1144 flat_%%f
(This script corrects deformations, then cut from the middle of the square 1000x1000px image size 4384x3288px.)