=?ISO-8859-1?Q?G=FCnter_Bachelier?= on wrote...
| Hello,
|
| how can I get in PerlMagick the numerical value
| of the comparison of two images with a specific
| metric like RMSE? Thank you.
|
Standard Perl magick example....
=======8<--------CUT HERE----------axes/crowbars permitted---------------
use Image::Magick;
$i1 = Image::Magick->new;
$i2 = Image::Magick->new;
$w = $i1->Read( filename=> shift ); # read in images
warn("$w") if $w;
exit if $w =~ /^Exception/;
$w = $i2->Read( filename=> shift );
warn("$w") if $w;
exit if $w =~ /^Exception/;
$i1->Scale(width=>100, height=>100); # scale without preserving aspect
ratio
$i2->Scale(width=>100, height=>100);
$w = $i1->Compare(image=>$i2); # compare
die "$w" if $w;
printf "Errors is %f\n", $i1->Get('error');
printf "Mean Error is %f\n", $i1->Get('mean-error');
printf "Max Error is %f\n", $i1->Get('maximum-error');
=======8<--------CUT HERE----------axes/crowbars permitted---------------
I forget what the exact meaning of each is, or how you get the other
metrics from the above.
Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
... and the smoking yet still impressive hole where the
Alchemist's Guild had been up until yesterday.
-- Terry Pratchett, "Soul Music"
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users