]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 18 Jan 2014 00:52:19 +0000 (00:52 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 18 Jan 2014 00:52:19 +0000 (00:52 +0000)
MagickCore/compare.c

index 9e83d9d6735e7de83acecaebcedc7ce3fadb1e00..948961aeea82ee63603784d183f038f36515f16c 100644 (file)
@@ -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;
     }