[magick-users] Auto alignment of shifted images

Claus Cyrny claus.cyrny at web.de
Thu Sep 13 09:25:44 PDT 2007


Hi Johnson,

Johnson Lau wrote:
> Dear All,
>
> I have two images.
> One is a blank questionnaire : http://www.comminn.net/ftp/a.jpg
> Another one is a completed questionnaire: http://www.comminn.net/ftp/b.jpg
> I have a program which could help me to enter the data automatically.
> However, as you can see, b.jpg is slightly shifted and not completely
> match a.jpg, and the data entry software could not tolerate. Since I
> have thousands of such questionnaires, and they have different type of
> slight shifting and rotation, I need a solution which could help me
> align all images automatically. I would like to know if ImageMagick or
> any other software could do this? Thanks very much!
>
> Regards,
>
> Johnson Lau
> _______________________________________________
> Magick-users mailing list
> Magick-users at imagemagick.org
> http://studio.imagemagick.org/mailman/listinfo/magick-users
>
>   
Imho, this  can only be done if /all/ of the images have the /same/
offset; otherwise one would have to write something that analyzes
each image and gives out the offset in relation to a reference
image (like 'a.jpg'). I'm not sure if IM could accomplish this.

My guess is that 'convert -fx' would /maybe/ be able to accomplish
at least the correction of the offset, but I'm not sure about the proper
syntax for the options. I tried 'convert b.jpg -fx 'i[-5]' 'j[-30]'
b_mod.png',
since 'b.jpg' has an offset of x=5/y=30 px, but this resulted in a syntax
error. IM didn't recognize the 'i[-5]' part. Does anyone know how to
invoke IM here properly?

Greetings,

Claus

-- 
Home Page        - http://home.arcor.de/ccyrny/            [in English]
graf-o-matic 2.0 - http://grafomatic01.twoday.net/         [in German]

********** Powered by Ubuntu Linux - http://www.ubuntu.com/ ***********



More information about the Magick-users mailing list