Compare (subimage-search) rotated image without intermediary files

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Compare (subimage-search) rotated image without intermediary files

Post by fmw42 »

You need 7.0.5.7. Likely it would do the job faster, but probably not by much.

I ran the following 3 times:

Code: Select all

time magick compare -metric rmse -subimage-search -dissimilarity-threshold 1 \
\( 370669patch.png +repage -background black -alpha background \) \
\( 224977object4.png +repage -background black -alpha background +distort SRT 180 -trim +repage \) \
-alpha off null:
real 0m2.756s
real 0m2.731s
real 0m2.753s

Code: Select all

magick \
\( 370669patch.png +repage -background black -alpha background \) \
\( 224977object4.png +repage -background black -alpha background \
    -background none -virtual-pixel background -distort SRT 180 -trim +repage \) miff:- |\
magick compare -metric rmse -subimage-search -dissimilarity-threshold 1 - null:
real 0m3.009s
real 0m3.020s
real 0m3.026s

So the first command is about 9% faster.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Compare (subimage-search) rotated image without intermediary files

Post by magick »

fmw42 wrote: 2017-05-20T17:06:12-07:00 In IM 7.0.5.7, you need to turn alpha off at the end or the diff-1.png image will be transparent.
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.
cowboyzed
Posts: 17
Joined: 2017-05-14T22:54:30-07:00
Authentication code: 1151

Re: Compare (subimage-search) rotated image without intermediary files

Post by cowboyzed »

Otherwise I want to know if there is a way to easily install these latests versions of IM under windows. The latest version of PECL supports only IM 6.9.3.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Compare (subimage-search) rotated image without intermediary files

Post by fmw42 »

cowboyzed wrote: 2017-06-05T08:21:50-07:00 Otherwise I want to know if there is a way to easily install these latests versions of IM under windows. The latest version of PECL supports only IM 6.9.3.
I think you will need to contact the Imagick developers. ImageMagick does not maintain Imagick nor did they develop Imagick.
cowboyzed
Posts: 17
Joined: 2017-05-14T22:54:30-07:00
Authentication code: 1151

Re: Compare (subimage-search) rotated image without intermediary files

Post by cowboyzed »

Thanks for your reply ;)
Post Reply