Page 1 of 1

Compare() and fuzz

Posted: 2009-04-12T11:35:58-07:00
by demiurg
I cannot figure how to supply fuzz parameter to Compare() function.

Is it possible at all ?

What am I missing ?

Re: Compare() and fuzz

Posted: 2009-04-12T14:56:51-07:00
by magick
We'll add a fuzz parameter to the Compare() method. Until then use Set():
  • $im->Set(fuzz=>'10%');
    $im->Compare(...);

Re: Compare() and fuzz

Posted: 2009-04-13T10:50:04-07:00
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.

Re: Compare() and fuzz

Posted: 2009-04-13T11:33:22-07:00
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.

Re: Compare() and fuzz

Posted: 2009-04-17T03:59:18-07:00
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.

Re: Compare() and fuzz

Posted: 2009-04-17T05:24:08-07:00
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.