Compare() and fuzz

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
demiurg

Compare() and fuzz

Post by demiurg »

I cannot figure how to supply fuzz parameter to Compare() function.

Is it possible at all ?

What am I missing ?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Compare() and fuzz

Post by magick »

We'll add a fuzz parameter to the Compare() method. Until then use Set():
  • $im->Set(fuzz=>'10%');
    $im->Compare(...);
demiurg

Re: Compare() and fuzz

Post by demiurg »

Are you sure :) ?
I tried that and it does not have any effect whatsoever on the comparison result, no matter what values I set fuzz to.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Compare() and fuzz

Post by magick »

You are right. Compare() generates the mean-error and maximum-error attributes for the image and does not consider fuzz. Instead we need to update the Compare() method to use CompareImages() rather than IsImagesEqual(). CompareImages() recognizes the fuzz setting and permits you to specify a metric (e.g. PSNR). Until we make this enhancement, fuzz will continue to have no effect on the Compare() PerlMagick method.
demiurg

Re: Compare() and fuzz

Post by demiurg »

Thanks for the clarification. Do you have any idea when it will be fixed ? I just have to decide whether to rewrite my script to execute "compare" command line utility or wait for the upgrade.

Thanks a lot.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Compare() and fuzz

Post by magick »

There is no ETA on a patch at this time. It could be next week and it might be end of summer. For now, use the compare command line utility.
Post Reply