possible bug compare -metric AE for IM 6.9.7.7 Q16 Mac OSX

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug compare -metric AE for IM 6.9.7.7 Q16 Mac OSX

Post by fmw42 »

I have these two images from the link at the discussion at viewtopic.php?f=1&t=31374#p142609


Image

Image

If I use MAE for the search, it works fine and I get

Code: Select all

compare -metric MAE -subimage-search f81dM.png FSDKC.png diffimage.png
1994.08 (0.0304277) @ 5,0
Image

But if I use AE, I get an error message even with -dissimilarity-threshold 1. That seems to be a bug, since setting -dissimilarity-threshold 1 should permit any dissimilarity. Is that not correct?

Code: Select all

compare -metric AE -subimage-search -dissimilarity-threshold 1 f81dM.png FSDKC.png diffimage.png
compare: images too dissimilar `f81dM.png' @ error/compare.c/CompareImageCommand/986.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug compare -metric AE for IM 6.9.7.7 Q16 Mac OSX

Post by magick »

Most metrics are normalized, AE is not. The dissimilarity threshold is relative to your metric. For AE and this sequence, use -dissimilarity-threshold 120000.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug compare -metric AE for IM 6.9.7.7 Q16 Mac OSX

Post by fmw42 »

Thanks. Is the dissimilarity-threshold needed for AE in raw values or normalized values. If I want to compute the worst possible value, then would it be total pixels in the image times 1 or times quantumvalue?
Post Reply