MagickCore
6.9.12-43
Convert, Edit, Or Compose Bitmap Images
|
#include "magick/studio.h"
#include "magick/artifact.h"
#include "magick/cache-view.h"
#include "magick/channel.h"
#include "magick/client.h"
#include "magick/color.h"
#include "magick/color-private.h"
#include "magick/colorspace.h"
#include "magick/colorspace-private.h"
#include "magick/compare.h"
#include "magick/composite-private.h"
#include "magick/constitute.h"
#include "magick/exception-private.h"
#include "magick/geometry.h"
#include "magick/image-private.h"
#include "magick/list.h"
#include "magick/log.h"
#include "magick/memory_.h"
#include "magick/monitor.h"
#include "magick/monitor-private.h"
#include "magick/option.h"
#include "magick/pixel-private.h"
#include "magick/property.h"
#include "magick/resource_.h"
#include "magick/string_.h"
#include "magick/string-private.h"
#include "magick/statistic.h"
#include "magick/thread-private.h"
#include "magick/transform.h"
#include "magick/utility.h"
#include "magick/version.h"
Macros | |
#define | SimilarityImageTag "Similarity/Image" |
#define | Log10Epsilon (1.0e-11) |
#define | SimilarityImageTag "Similarity/Image" |
Functions | |
MagickExport Image * | CompareImages (Image *image, const Image *reconstruct_image, const MetricType metric, double *distortion, ExceptionInfo *exception) |
static size_t | GetNumberChannels (const Image *image, const ChannelType channel) |
static MagickBooleanType | ValidateImageMorphology (const Image *magick_restrict image, const Image *magick_restrict reconstruct_image) |
MagickExport Image * | CompareImageChannels (Image *image, const Image *reconstruct_image, const ChannelType channel, const MetricType metric, double *distortion, ExceptionInfo *exception) |
MagickExport MagickBooleanType | GetImageDistortion (Image *image, const Image *reconstruct_image, const MetricType metric, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetAbsoluteDistortion (const Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetFuzzDistortion (const Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetMeanAbsoluteDistortion (const Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetMeanErrorPerPixel (Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetMeanSquaredDistortion (const Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetNormalizedCrossCorrelationDistortion (const Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetPeakAbsoluteDistortion (const Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
static double | MagickLog10 (const double x) |
static MagickBooleanType | GetPeakSignalToNoiseRatio (const Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetPerceptualHashDistortion (const Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetRootMeanSquaredDistortion (const Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
MagickExport MagickBooleanType | GetImageChannelDistortion (Image *image, const Image *reconstruct_image, const ChannelType channel, const MetricType metric, double *distortion, ExceptionInfo *exception) |
MagickExport double * | GetImageChannelDistortions (Image *image, const Image *reconstruct_image, const MetricType metric, ExceptionInfo *exception) |
MagickExport MagickBooleanType | IsImagesEqual (Image *image, const Image *reconstruct_image) |
static double | GetSimilarityMetric (const Image *image, const Image *reference, const MetricType metric, const ssize_t x_offset, const ssize_t y_offset, ExceptionInfo *exception) |
MagickExport Image * | SimilarityImage (Image *image, const Image *reference, RectangleInfo *offset, double *similarity_metric, ExceptionInfo *exception) |
MagickExport Image * | SimilarityMetricImage (Image *image, const Image *reference, const MetricType metric, RectangleInfo *offset, double *similarity_metric, ExceptionInfo *exception) |
#define Log10Epsilon (1.0e-11) |
Referenced by MagickLog10().
#define SimilarityImageTag "Similarity/Image" |
Referenced by GetNormalizedCrossCorrelationDistortion(), and SimilarityMetricImage().
#define SimilarityImageTag "Similarity/Image" |
MagickExport Image* CompareImageChannels | ( | Image * | image, |
const Image * | reconstruct_image, | ||
const ChannelType | channel, | ||
const MetricType | metric, | ||
double * | distortion, | ||
ExceptionInfo * | exception | ||
) |
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), BlueChannel, CloneImage(), CMYKColorspace, _Image::colorspace, _Image::columns, _Image::compose, CompositeChannels, CompositeImage(), ConvertRGBToCMYK(), _Image::debug, DestroyCacheView(), DestroyImage(), DirectClass, _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetFuzzyColorDistance(), GetImageArtifact(), GetImageChannelDistortion(), GetMagickModule, GetMagickPixelPacket(), GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelOpacity, GetPixelRed, GreenChannel, ImageError, IndexChannel, InheritException(), IsMagickColorSimilar(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickMax, MagickTrue, _Image::matte, OpacityChannel, OpaqueAlphaChannel, OpaqueOpacity, PerceptualHashErrorMetric, QuantumRange, QuantumScale, QueryMagickColor(), QueueCacheViewAuthenticPixels(), RedChannel, _Image::rows, SetImageAlphaChannel(), SetImageMask(), SetImageStorageClass(), SetMagickPixelPacket(), SetPixelPacket(), _Image::signature, SyncCacheViewAuthenticPixels(), ThrowImageException, TraceEvent, and ValidateImageMorphology().
Referenced by CompareImages().
MagickExport Image* CompareImages | ( | Image * | image, |
const Image * | reconstruct_image, | ||
const MetricType | metric, | ||
double * | distortion, | ||
ExceptionInfo * | exception | ||
) |
References CompareImageChannels(), and CompositeChannels.
|
static |
References AcquireVirtualCacheView(), BlackChannel, BlueChannel, CMYKColorspace, _Image::colorspace, _Image::columns, CompositeChannels, DestroyCacheView(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetFuzzyColorDistance(), GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelOpacity, GetPixelRed, GreenChannel, IndexChannel, magick_restrict, MagickFalse, MagickMax, MagickTrue, _Image::matte, OpacityChannel, OpaqueOpacity, QuantumRange, QuantumScale, RedChannel, and _Image::rows.
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
|
static |
References AcquireVirtualCacheView(), BlackChannel, BlueChannel, CMYKColorspace, _Image::colorspace, _Image::columns, CompositeChannels, DestroyCacheView(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetNumberChannels(), GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelIndex, GetPixelOpacity, GetPixelRed, GreenChannel, IndexChannel, magick_restrict, MagickFalse, MagickMax, MagickTrue, _Image::matte, OpacityChannel, OpaqueOpacity, QuantumRange, QuantumScale, RedChannel, and _Image::rows.
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
MagickExport MagickBooleanType GetImageChannelDistortion | ( | Image * | image, |
const Image * | reconstruct_image, | ||
const ChannelType | channel, | ||
const MetricType | metric, | ||
double * | distortion, | ||
ExceptionInfo * | exception | ||
) |
References AbsoluteErrorMetric, AcquireQuantumMemory(), CompositeChannels, _Image::debug, _Image::filename, FormatImageProperty(), FuzzErrorMetric, GetAbsoluteDistortion(), GetFuzzDistortion(), GetMagickModule, GetMagickPrecision(), GetMeanAbsoluteDistortion(), GetMeanErrorPerPixel(), GetMeanSquaredDistortion(), GetNormalizedCrossCorrelationDistortion(), GetPeakAbsoluteDistortion(), GetPeakSignalToNoiseRatio(), GetPerceptualHashDistortion(), GetRootMeanSquaredDistortion(), ImageError, LogMagickEvent(), MagickCoreSignature, MagickFalse, MeanAbsoluteErrorMetric, MeanErrorPerPixelMetric, MeanSquaredErrorMetric, NormalizedCrossCorrelationErrorMetric, PeakAbsoluteErrorMetric, PeakSignalToNoiseRatioMetric, PerceptualHashErrorMetric, RelinquishMagickMemory(), ResourceLimitFatalError, RootMeanSquaredErrorMetric, _Image::signature, ThrowBinaryException, ThrowFatalException, TraceEvent, and ValidateImageMorphology().
Referenced by CompareImageChannels(), and GetImageDistortion().
MagickExport double* GetImageChannelDistortions | ( | Image * | image, |
const Image * | reconstruct_image, | ||
const MetricType | metric, | ||
ExceptionInfo * | exception | ||
) |
References AbsoluteErrorMetric, AcquireQuantumMemory(), CompositeChannels, _Image::debug, _Image::exception, _Image::filename, FuzzErrorMetric, GetAbsoluteDistortion(), GetFuzzDistortion(), GetMagickModule, GetMeanAbsoluteDistortion(), GetMeanErrorPerPixel(), GetMeanSquaredDistortion(), GetNormalizedCrossCorrelationDistortion(), GetPeakAbsoluteDistortion(), GetPeakSignalToNoiseRatio(), GetPerceptualHashDistortion(), GetRootMeanSquaredDistortion(), ImageError, LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, MeanAbsoluteErrorMetric, MeanErrorPerPixelMetric, MeanSquaredErrorMetric, NormalizedCrossCorrelationErrorMetric, PeakAbsoluteErrorMetric, PeakSignalToNoiseRatioMetric, PerceptualHashErrorMetric, RelinquishMagickMemory(), ResourceLimitFatalError, RootMeanSquaredErrorMetric, _Image::signature, ThrowFatalException, ThrowMagickException(), TraceEvent, and ValidateImageMorphology().
MagickExport MagickBooleanType GetImageDistortion | ( | Image * | image, |
const Image * | reconstruct_image, | ||
const MetricType | metric, | ||
double * | distortion, | ||
ExceptionInfo * | exception | ||
) |
References CompositeChannels, and GetImageChannelDistortion().
Referenced by GetSimilarityMetric().
|
static |
References AcquireVirtualCacheView(), BlackChannel, BlueChannel, CMYKColorspace, _Image::colorspace, _Image::columns, CompositeChannels, DestroyCacheView(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetNumberChannels(), GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelIndex, GetPixelOpacity, GetPixelRed, GreenChannel, IndexChannel, magick_restrict, MagickFalse, MagickMax, MagickTrue, _Image::matte, OpacityChannel, OpaqueOpacity, QuantumRange, QuantumScale, RedChannel, and _Image::rows.
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
|
static |
References AcquireVirtualCacheView(), BlackChannel, BlueChannel, CMYKColorspace, _Image::colorspace, _Image::columns, CompositeChannels, DestroyCacheView(), _Image::error, GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelIndex, GetPixelOpacity, GetPixelRed, GreenChannel, IndexChannel, magick_restrict, MagickFalse, MagickMax, MagickTrue, _Image::matte, _ErrorInfo::mean_error_per_pixel, _ErrorInfo::normalized_maximum_error, _ErrorInfo::normalized_mean_error, OpacityChannel, OpaqueOpacity, PerceptibleReciprocal(), QuantumRange, QuantumScale, RedChannel, and _Image::rows.
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
|
static |
References AcquireVirtualCacheView(), BlackChannel, BlueChannel, CMYKColorspace, _Image::colorspace, _Image::columns, CompositeChannels, DestroyCacheView(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetNumberChannels(), GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelIndex, GetPixelOpacity, GetPixelRed, GreenChannel, IndexChannel, magick_restrict, MagickFalse, MagickMax, MagickTrue, _Image::matte, OpacityChannel, OpaqueOpacity, QuantumRange, QuantumScale, RedChannel, and _Image::rows.
Referenced by GetImageChannelDistortion(), GetImageChannelDistortions(), GetPeakSignalToNoiseRatio(), and GetRootMeanSquaredDistortion().
|
static |
References AcquireVirtualCacheView(), BlackChannel, BlueChannel, CMYKColorspace, _Image::colorspace, _Image::columns, CompositeChannels, DestroyCacheView(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetImageChannelStatistics(), GetNumberChannels(), GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelIndex, GetPixelOpacity, GetPixelRed, GreenChannel, IndexChannel, magick_restrict, MagickEpsilon, MagickFalse, MagickMax, MagickTrue, _Image::matte, _ChannelStatistics::mean, OpacityChannel, OpaqueOpacity, PerceptibleReciprocal(), _Image::progress_monitor, QuantumRange, QuantumScale, RedChannel, RelinquishMagickMemory(), _Image::rows, SetImageProgress(), SimilarityImageTag, and _ChannelStatistics::standard_deviation.
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
|
static |
References BlueChannel, CMYKColorspace, _Image::colorspace, GreenChannel, IndexChannel, MagickFalse, _Image::matte, OpacityChannel, and RedChannel.
Referenced by GetFuzzDistortion(), GetMeanAbsoluteDistortion(), GetMeanSquaredDistortion(), GetNormalizedCrossCorrelationDistortion(), and ValidateImageMorphology().
|
static |
References AcquireVirtualCacheView(), BlackChannel, BlueChannel, CMYKColorspace, _Image::colorspace, _Image::columns, CompositeChannels, DestroyCacheView(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelIndex, GetPixelOpacity, GetPixelRed, GreenChannel, IndexChannel, magick_restrict, MagickFalse, MagickMax, MagickTrue, _Image::matte, OpacityChannel, OpaqueOpacity, QuantumRange, QuantumScale, RedChannel, and _Image::rows.
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
|
static |
References BlackChannel, BlueChannel, CMYKColorspace, _Image::colorspace, CompositeChannels, GetMeanSquaredDistortion(), GreenChannel, IndexChannel, INFINITY, MagickEpsilon, MagickFalse, MagickLog10(), _Image::matte, OpacityChannel, and RedChannel.
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
|
static |
References BlueChannel, CMYKColorspace, _Image::colorspace, CompositeChannels, GetImageChannelPerceptualHash(), GreenChannel, IndexChannel, MagickFalse, MagickTrue, _Image::matte, MaximumNumberOfImageMoments, OpacityChannel, _ChannelPerceptualHash::P, _ChannelPerceptualHash::Q, RedChannel, and RelinquishMagickMemory().
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
|
static |
References BlackChannel, BlueChannel, CMYKColorspace, _Image::colorspace, CompositeChannels, GetMeanSquaredDistortion(), GreenChannel, IndexChannel, MagickFalse, _Image::matte, OpacityChannel, and RedChannel.
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
|
static |
References CropImage(), DestroyImage(), GetImageDistortion(), SetGeometry(), _RectangleInfo::x, and _RectangleInfo::y.
Referenced by SimilarityMetricImage().
MagickExport MagickBooleanType IsImagesEqual | ( | Image * | image, |
const Image * | reconstruct_image | ||
) |
References AcquireVirtualCacheView(), CMYKColorspace, _Image::colorspace, _Image::columns, DestroyCacheView(), _Image::error, _Image::exception, _Image::filename, GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetPixelBlue, GetPixelGreen, GetPixelIndex, GetPixelOpacity, GetPixelRed, ImageError, magick_restrict, MagickCoreSignature, MagickFalse, MagickMax, MagickTrue, _Image::matte, _ErrorInfo::mean_error_per_pixel, _ErrorInfo::normalized_maximum_error, _ErrorInfo::normalized_mean_error, PerceptibleReciprocal(), QuantumScale, _Image::rows, _Image::signature, ThrowBinaryException, and ValidateImageMorphology().
|
inlinestatic |
References Log10Epsilon.
Referenced by GetPeakSignalToNoiseRatio().
MagickExport Image* SimilarityImage | ( | Image * | image, |
const Image * | reference, | ||
RectangleInfo * | offset, | ||
double * | similarity_metric, | ||
ExceptionInfo * | exception | ||
) |
References RootMeanSquaredErrorMetric, and SimilarityMetricImage().
MagickExport Image* SimilarityMetricImage | ( | Image * | image, |
const Image * | reference, | ||
const MetricType | metric, | ||
RectangleInfo * | offset, | ||
double * | similarity_metric, | ||
ExceptionInfo * | exception | ||
) |
References AcquireVirtualCacheView(), ClampToQuantum(), CloneImage(), _Image::columns, DeactivateAlphaChannel, _Image::debug, DestroyCacheView(), DestroyImage(), DirectClass, _Image::exception, _Image::filename, GetCacheViewAuthenticPixels(), GetImageArtifact(), GetMagickModule, GetPixelRed, GetSimilarityMetric(), ImageError, InheritException(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickMaximumValue, MagickMin, MagickTrue, NormalizedCrossCorrelationErrorMetric, PerceptualHashErrorMetric, _Image::progress_monitor, QuantumRange, _Image::rows, SetGeometry(), SetImageAlphaChannel(), SetImageProgress(), SetImageStorageClass(), SetPixelBlue, SetPixelGreen, SetPixelRed, _ExceptionInfo::signature, _Image::signature, SimilarityImageTag, StringToDouble(), SyncCacheViewAuthenticPixels(), ThrowImageException, TraceEvent, UndefinedErrorMetric, ValidateImageMorphology(), _RectangleInfo::x, and _RectangleInfo::y.
Referenced by SimilarityImage().
|
inlinestatic |
References DefaultChannels, GetNumberChannels(), MagickFalse, and MagickTrue.
Referenced by CompareImageChannels(), GetImageChannelDistortion(), GetImageChannelDistortions(), IsImagesEqual(), and SimilarityMetricImage().