From: cristy Date: Sat, 18 Jan 2014 00:52:19 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~2839 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=35819041a9576c489b24b3636029c8e0e549f826;p=imagemagick --- diff --git a/MagickCore/compare.c b/MagickCore/compare.c index 9e83d9d67..948961aee 100644 --- a/MagickCore/compare.c +++ b/MagickCore/compare.c @@ -1157,8 +1157,8 @@ static MagickBooleanType GetPerceptualHashDistortion(const Image *image, double difference; - if ((fabs(reconstruct_moments[channel].I[i]) < MagickEpsilon) || - (fabs(image_moments[channel].I[i]) < MagickEpsilon)) + if ((fabs(image_moments[channel].ellipse_intensity) < MagickEpsilon) || + (fabs(reconstruct_moments[channel].ellipse_intensity) < MagickEpsilon)) continue; difference=log10(fabs(reconstruct_moments[channel].I[i]))- log10(fabs(image_moments[channel].I[i])); @@ -1208,11 +1208,11 @@ static MagickBooleanType GetPerceptualHashDistortion(const Image *image, double difference; - if ((fabs(reconstruct_moments[channel].I[i]) < MagickEpsilon) || - (fabs(image_moments[channel].I[i]) < MagickEpsilon)) + if ((fabs(image_moments[channel].ellipse_intensity) < MagickEpsilon) || + (fabs(reconstruct_moments[channel].ellipse_intensity) < MagickEpsilon)) continue; difference=log10(fabs(reconstruct_moments[channel].I[i]))- - log10(fabs(image_moments[channel].I[i])); + log10(fabs(image_moments[channel].I[i])); distortion[channel]+=difference*difference; distortion[CompositePixelChannel]+=difference*difference; }