Skip to content

Commit

Permalink
white is maximum point of the correlation image
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Feb 15, 2025
1 parent bc4d820 commit 4761dcb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion magick/compare.c
Original file line number Diff line number Diff line change
Expand Up @@ -2209,7 +2209,9 @@ MagickExport Image *SimilarityMetricImage(Image *image,const Image *reference,
}
if (metric == PerceptualHashErrorMetric)
similarity=MagickMin(0.01*similarity,1.0);
if (metric == NormalizedCrossCorrelationErrorMetric)
if ((metric == MeanSquaredErrorMetric) ||
(metric == NormalizedCrossCorrelationErrorMetric) ||
(metric == RootMeanSquaredErrorMetric))
SetPixelRed(q,ClampToQuantum((double) QuantumRange-QuantumRange*
similarity));
else
Expand Down

0 comments on commit 4761dcb

Please sign in to comment.