return(status);
}
+static MagickBooleanType GetPerceptualHashDistortion(const Image *image,
+ const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
+{
+ *distortion=0.0;
+ return(MagickTrue);
+}
+
static MagickBooleanType GetRootMeanSquaredDistortion(const Image *image,
const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
{
channel_distortion,exception);
break;
}
- case PeakSignalToNoiseRatioMetric:
+ case PeakSignalToNoiseRatioErrorMetric:
{
status=GetPeakSignalToNoiseRatio(image,reconstruct_image,
channel_distortion,exception);
break;
}
+ case PerceptualHashErrorMetric:
+ {
+ status=GetPerceptualHashDistortion(image,reconstruct_image,
+ channel_distortion,exception);
+ break;
+ }
case RootMeanSquaredErrorMetric:
{
status=GetRootMeanSquaredDistortion(image,reconstruct_image,
channel_distortion,exception);
break;
}
- case PeakSignalToNoiseRatioMetric:
+ case PeakSignalToNoiseRatioErrorMetric:
{
status=GetPeakSignalToNoiseRatio(image,reconstruct_image,
channel_distortion,exception);
break;
}
+ case PerceptualHashErrorMetric:
+ {
+ status=GetRootMeanSquaredDistortion(image,reconstruct_image,
+ channel_distortion,exception);
+ break;
+ }
case RootMeanSquaredErrorMetric:
{
status=GetRootMeanSquaredDistortion(image,reconstruct_image,
MeanSquaredErrorMetric,
NormalizedCrossCorrelationErrorMetric,
PeakAbsoluteErrorMetric,
- PeakSignalToNoiseRatioMetric,
+ PeakSignalToNoiseRatioErrorMetric,
PerceptualHashErrorMetric,
RootMeanSquaredErrorMetric
} MetricType;
{ "NCC", NormalizedCrossCorrelationErrorMetric, UndefinedOptionFlag, MagickFalse },
{ "PAE", PeakAbsoluteErrorMetric, UndefinedOptionFlag, MagickFalse },
{ "PHASh", PerceptualHashErrorMetric, UndefinedOptionFlag, MagickFalse },
- { "PSNR", PeakSignalToNoiseRatioMetric, UndefinedOptionFlag, MagickFalse },
+ { "PSNR", PeakSignalToNoiseRatioErrorMetric, UndefinedOptionFlag, MagickFalse },
{ "RMSE", RootMeanSquaredErrorMetric, UndefinedOptionFlag, MagickFalse },
{ (char *) NULL, UndefinedErrorMetric, UndefinedOptionFlag, MagickFalse }
},
}
case AbsoluteErrorMetric:
case NormalizedCrossCorrelationErrorMetric:
- case PeakSignalToNoiseRatioMetric:
+ case PeakSignalToNoiseRatioErrorMetric:
{
(void) FormatLocaleFile(stderr,"%g",distortion);
if ((reconstruct_image->columns != image->columns) ||
}
case AbsoluteErrorMetric:
case NormalizedCrossCorrelationErrorMetric:
- case PeakSignalToNoiseRatioMetric:
+ case PeakSignalToNoiseRatioErrorMetric:
{
switch (image->colorspace)
{