Page 1 of 1

compare meric AE ignores fuzz factor

Posted: 2010-12-02T16:51:54-07:00
by anthony
The compare option -mertic AE returns a list of the number of pixels that was different
between the images.

compare also has a -fuzz option which adjusts the number of modified pixels reported by the output image. However this factor does not modify the pixel count returned by the AE metric, it only effects the output image.

Can we have a TE metric added that returns the Threshold Error.
That is the number of pixels in the image that are NOT within the 'fuzz factor' threshold.
I don't actually care about the output image.

ASIDE: if the output image of compare is NULL: perhaps compare can avoid image mask processing and thus speed up its processing.

Re: compare meric AE ignores fuzz factor

Posted: 2010-12-04T19:00:41-07:00
by magick
AE respects -fuzz. We tried
  • compare -fuzz 15% -metric ae rose: rose: null:
Debugging shows the fuzz @ 9830.25 for Q16. Method magick/compare.c/GetAbsoluteDistortion() calls IsMagickColorSimilar() which respects the pixel fuzz.

Re: compare meric AE ignores fuzz factor

Posted: 2010-12-05T20:00:03-07:00
by anthony
Strange when I tested that a few days ago it wasn't working! I must have been doing it wrong!

Only to AE Any two transparent colors are equal

compare -metric AE xc:#0000 xc:#FFF0 null:
0

But of course to RMSE they are different!

compare -metric RMSE xc:#0000 xc:#FFF0 null:
56755 (0.866025)

Though I do not understand why the distance is 86.7% of the distance between white and black!
That does not seem to make a lot of sense!

Re: compare meric AE ignores fuzz factor

Posted: 2010-12-05T20:14:03-07:00
by anthony
Can we modify the code so that we get a Fuzz Factor 'distance' metric.
EG:
compare -metric Fuzz xc:Blue xc:Navy null:
16383.8 (0.25)

Note that this should return the same result for RMSE for fully-opaque colors.
However Fuzz results are different when transparency is involved. EG:

compare -metric Fuzz xc:#0000 xc:#FFF0 null:
0 (0.00000)

We may have a new fuzz factor formula soon. One that treats None to any opaque color as being the same.

Re: compare meric AE ignores fuzz factor

Posted: 2010-12-05T21:58:12-07:00
by fmw42
why not just a new parameter for compare such as -respect-transparency or something like that (or -channel rgba)

Re: compare meric AE ignores fuzz factor

Posted: 2010-12-06T00:31:38-07:00
by anthony
Because it should not effect other metrics!!!! It is a completely separate metric.

Re: compare meric AE ignores fuzz factor

Posted: 2010-12-06T10:40:16-07:00
by fmw42
anthony wrote:Because it should not effect other metrics!!!! It is a completely separate metric.
Yes, I agree. I thought about that over night and realized that it was only for rmse and your method would not affect the others, but mine would, if taken full course. My alternate suggestions are withdrawn.