return(status);
}
+static MagickBooleanType GetStructuralSimilarityDistortion(const Image *image,
+ const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
+{
+ MagickBooleanType
+ status;
+
+ register ssize_t
+ i;
+
+ status=GetMeanSquaredDistortion(image,reconstruct_image,distortion,exception);
+ for (i=0; i <= MaxPixelChannels; i++)
+ distortion[i]=sqrt(distortion[i]);
+ return(status);
+}
+
+static MagickBooleanType GetStructuralDisimilarityDistortion(const Image *image,
+ const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
+{
+ MagickBooleanType
+ status;
+
+ status=GetStructuralSimilarityDistortion(image,reconstruct_image,
+ distortion,exception);
+ *distortion=(1.0-(*distortion))/2.0;
+ return(status);
+}
+
MagickExport MagickBooleanType GetImageDistortion(Image *image,
const Image *reconstruct_image,const MetricType metric,double *distortion,
ExceptionInfo *exception)
channel_distortion,exception);
break;
}
+ case StructuralSimilarityErrorMetric:
+ {
+ status=GetStructuralSimilarityDistortion(image,reconstruct_image,
+ channel_distortion,exception);
+ break;
+ }
+ case StructuralDissimilarityErrorMetric:
+ {
+ status=GetStructuralDisimilarityDistortion(image,reconstruct_image,
+ channel_distortion,exception);
+ break;
+ }
}
*distortion=channel_distortion[CompositePixelChannel];
channel_distortion=(double *) RelinquishMagickMemory(channel_distortion);
PeakAbsoluteErrorMetric,
PeakSignalToNoiseRatioErrorMetric,
PerceptualHashErrorMetric,
- RootMeanSquaredErrorMetric
+ RootMeanSquaredErrorMetric,
+ StructuralSimilarityErrorMetric,
+ StructuralDissimilarityErrorMetric
} MetricType;
extern MagickExport double
{ "PHASH", PerceptualHashErrorMetric, UndefinedOptionFlag, MagickFalse },
{ "PSNR", PeakSignalToNoiseRatioErrorMetric, UndefinedOptionFlag, MagickFalse },
{ "RMSE", RootMeanSquaredErrorMetric, UndefinedOptionFlag, MagickFalse },
+ { "SSIM", StructuralSimilarityErrorMetric, UndefinedOptionFlag, MagickFalse },
{ (char *) NULL, UndefinedErrorMetric, UndefinedOptionFlag, MagickFalse }
},
MethodOptions[] =
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ImageMagick 7.0.6-8.
+# Generated by GNU Autoconf 2.69 for ImageMagick 7.0.6-9.
#
# Report bugs to <https://github.com/ImageMagick/ImageMagick/issues>.
#
# Identity of this package.
PACKAGE_NAME='ImageMagick'
PACKAGE_TARNAME='ImageMagick'
-PACKAGE_VERSION='7.0.6-8'
-PACKAGE_STRING='ImageMagick 7.0.6-8'
+PACKAGE_VERSION='7.0.6-9'
+PACKAGE_STRING='ImageMagick 7.0.6-9'
PACKAGE_BUGREPORT='https://github.com/ImageMagick/ImageMagick/issues'
PACKAGE_URL='https://www.imagemagick.org'
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ImageMagick 7.0.6-8 to adapt to many kinds of systems.
+\`configure' configures ImageMagick 7.0.6-9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ImageMagick 7.0.6-8:";;
+ short | recursive ) echo "Configuration of ImageMagick 7.0.6-9:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ImageMagick configure 7.0.6-8
+ImageMagick configure 7.0.6-9
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ImageMagick $as_me 7.0.6-8, which was
+It was created by ImageMagick $as_me 7.0.6-9, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='ImageMagick'
- VERSION='7.0.6-8'
+ VERSION='7.0.6-9'
cat >>confdefs.h <<_ACEOF
MAGICK_MICRO_VERSION=6
-MAGICK_PATCHLEVEL_VERSION=8
+MAGICK_PATCHLEVEL_VERSION=9
-MAGICK_VERSION=7.0.6-8
+MAGICK_VERSION=7.0.6-9
-MAGICK_GIT_REVISION=20819:6e663f7e3:20170815
+MAGICK_GIT_REVISION=20847:4575049ec:20170819
# Substitute library versioning
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ImageMagick $as_me 7.0.6-8, which was
+This file was extended by ImageMagick $as_me 7.0.6-9, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ImageMagick config.status 7.0.6-8
+ImageMagick config.status 7.0.6-9
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
m4_define([magick_major_version], [7])
m4_define([magick_minor_version], [0])
m4_define([magick_micro_version], [6])
-m4_define([magick_patchlevel_version], [8])
+m4_define([magick_patchlevel_version], [9])
m4_define([magick_version],
[magick_major_version.magick_minor_version.magick_micro_version-magick_patchlevel_version])
m4_define([magick_git_revision], esyscmd([sh -c "(gitversion.sh .) | tr -d '\n'"]))
PACKAGE_VERSION='7.0.6'
PACKAGE_PERL_VERSION='7.06'
PACKAGE_LIB_VERSION="0x706"
-PACKAGE_RELEASE="8"
+PACKAGE_RELEASE="9"
PACKAGE_LIB_VERSION_NUMBER="7,0,6,${PACKAGE_RELEASE}"
PACKAGE_RELEASE_DATE_RAW=`date +%F`
PACKAGE_RELEASE_DATE_REPRODUCIBLE="${PACKAGE_CHANGE_DATE}"