Page 1 of 1

Compare doesnt work with different width and height

Posted: 2013-07-19T02:56:43-07:00
by sagarghuge16
Hi,
I am using Version: ImageMagick 6.8.6-6 2013-07-19
i have two images larger one and smaller one. i want to fire " compare -verbose jump_scrshot.png seekbar.png out.png"

but it gives me error "compare: image widths or heights differ `jump_scrshot.png' @ error/compare.c/CompareImageCommand/977"

i want the coordinate where we find the smaller image.

you will find images here:
https://www.dropbox.com/s/w17cafzoh04v7 ... crshot.png
https://www.dropbox.com/s/6jaloo0ab5jkxt0/seekbar.png

Re: Compare doesnt work with different width and height

Posted: 2013-07-19T06:36:19-07:00
by snibgo
Use "-subimage-search": http://www.imagemagick.org/script/comma ... age-search

Eg:

Code: Select all

D:\web\im>%IM%compare -metric RMSE -subimage-search jump_scrshot.png seekbar.png NULL:
1.39105 (2.12261e-005) @ 81,572
The location is 81,572.

Re: Compare doesnt work with different width and height

Posted: 2013-07-21T22:32:59-07:00
by sagarghuge16
-subimage-search works fine but it takes time.
when i used -verbose on previous version it took around 8 sec to find subimage. i want efficient way to find the subimage.

Re: Compare doesnt work with different width and height

Posted: 2013-07-21T22:48:23-07:00
by fmw42
if on Linux/Mac and compile in HDRI mode, then you can try my FFT normcrosscor. See link below.