MagickCore
7.0.0
|
#include "MagickCore/studio.h"
#include "MagickCore/artifact.h"
#include "MagickCore/cache-view.h"
#include "MagickCore/channel.h"
#include "MagickCore/client.h"
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace.h"
#include "MagickCore/colorspace-private.h"
#include "MagickCore/compare.h"
#include "MagickCore/composite-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/geometry.h"
#include "MagickCore/image-private.h"
#include "MagickCore/list.h"
#include "MagickCore/log.h"
#include "MagickCore/memory_.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/option.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/resource_.h"
#include "MagickCore/string_.h"
#include "MagickCore/statistic.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/transform.h"
#include "MagickCore/utility.h"
#include "MagickCore/version.h"
Go to the source code of this file.
Macros | |
#define | SimilarityImageTag "Similarity/Image" |
#define | SimilarityImageTag "Similarity/Image" |
Functions | |
MagickExport Image * | CompareImages (Image *image, const Image *reconstruct_image, const MetricType metric, double *distortion, ExceptionInfo *exception) |
static double | MagickMax (const double x, const double y) |
static MagickBooleanType | GetAbsoluteDistortion (const Image *image, const Image *reconstruct_image, double *distortion, ExceptionInfo *exception) |
static size_t | GetImageChannels (const Image *image) |
static MagickBooleanType | GetFuzzDistortion (const Image *image, const Image *reconstruct_image, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetMeanAbsoluteDistortion (const Image *image, const Image *reconstruct_image, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetMeanErrorPerPixel (Image *image, const Image *reconstruct_image, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetMeanSquaredDistortion (const Image *image, const Image *reconstruct_image, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetNormalizedCrossCorrelationDistortion (const Image *image, const Image *reconstruct_image, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetPeakAbsoluteDistortion (const Image *image, const Image *reconstruct_image, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetPeakSignalToNoiseRatio (const Image *image, const Image *reconstruct_image, double *distortion, ExceptionInfo *exception) |
static MagickBooleanType | GetRootMeanSquaredDistortion (const Image *image, const Image *reconstruct_image, double *distortion, ExceptionInfo *exception) |
MagickExport MagickBooleanType | GetImageDistortion (Image *image, const Image *reconstruct_image, const MetricType metric, double *distortion, ExceptionInfo *exception) |
MagickExport double * | GetImageDistortions (Image *image, const Image *reconstruct_image, const MetricType metric, ExceptionInfo *exception) |
MagickExport MagickBooleanType | IsImagesEqual (Image *image, const Image *reconstruct_image, ExceptionInfo *exception) |
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, const MetricType metric, const double similarity_threshold, RectangleInfo *offset, double *similarity_metric, ExceptionInfo *exception) |
#define SimilarityImageTag "Similarity/Image" |
Referenced by GetNormalizedCrossCorrelationDistortion(), and SimilarityImage().
#define SimilarityImageTag "Similarity/Image" |
MagickExport Image* CompareImages | ( | Image * | image, |
const Image * | reconstruct_image, | ||
const MetricType | metric, | ||
double * | distortion, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 105 of file compare.c.
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), AllCompliance, CloneImage(), _Image::columns, _Image::compose, CompositeImage(), _Image::debug, DestroyCacheView(), DestroyImage(), DirectClass, _Image::filename, GetCacheViewVirtualPixels(), GetImageArtifact(), GetImageDistortion(), GetMagickModule, GetPixelAlpha(), GetPixelChannel(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelReadMask(), ImageError, LogMagickEvent(), MagickEpsilon, MagickFalse, MagickSignature, MagickTrue, OpaqueAlphaChannel, QuantumScale, QueryColorCompliance(), QueueCacheViewAuthenticPixels(), _Image::rows, SetImageAlphaChannel(), SetImageStorageClass(), SetPixelInfoPixel(), _Image::signature, SyncCacheViewAuthenticPixels(), ThrowImageException, TraceEvent, UndefinedPixelTrait, and UpdatePixelTrait.
|
static |
Definition at line 317 of file compare.c.
References AcquireVirtualCacheView(), _Image::columns, CompositePixelChannel, DestroyCacheView(), _Image::fuzz, GetCacheViewVirtualPixels(), GetPixelAlpha(), GetPixelChannel(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelReadMask(), MagickFalse, MagickMax(), MagickSQ1_2, MagickTrue, MaxPixelChannels, QuantumScale, ResetMagickMemory(), _Image::rows, UndefinedPixelTrait, and UpdatePixelTrait.
Referenced by GetImageDistortion(), and GetImageDistortions().
|
static |
Definition at line 456 of file compare.c.
References AcquireVirtualCacheView(), _Image::columns, CompositePixelChannel, DestroyCacheView(), GetCacheViewVirtualPixels(), GetImageChannels(), GetPixelAlpha(), GetPixelChannel(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelReadMask(), MagickFalse, MagickTrue, MaxPixelChannels, QuantumScale, ResetMagickMemory(), _Image::rows, UndefinedPixelTrait, and UpdatePixelTrait.
Referenced by GetImageDistortion(), and GetImageDistortions().
|
static |
Definition at line 437 of file compare.c.
References GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), and UpdatePixelTrait.
Referenced by GetFuzzDistortion(), GetMeanAbsoluteDistortion(), GetMeanSquaredDistortion(), and GetNormalizedCrossCorrelationDistortion().
MagickExport MagickBooleanType GetImageDistortion | ( | Image * | image, |
const Image * | reconstruct_image, | ||
const MetricType | metric, | ||
double * | distortion, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1107 of file compare.c.
References AbsoluteErrorMetric, AcquireQuantumMemory(), _Image::columns, CompositePixelChannel, _Image::debug, _Image::filename, FuzzErrorMetric, GetAbsoluteDistortion(), GetFuzzDistortion(), GetMagickModule, GetMeanAbsoluteDistortion(), GetMeanErrorPerPixel(), GetMeanSquaredDistortion(), GetNormalizedCrossCorrelationDistortion(), GetPeakAbsoluteDistortion(), GetPeakSignalToNoiseRatio(), GetRootMeanSquaredDistortion(), ImageError, LogMagickEvent(), MagickFalse, MagickSignature, MaxPixelChannels, MeanAbsoluteErrorMetric, MeanErrorPerPixelMetric, MeanSquaredErrorMetric, NormalizedCrossCorrelationErrorMetric, PeakAbsoluteErrorMetric, PeakSignalToNoiseRatioMetric, RelinquishMagickMemory(), ResetMagickMemory(), ResourceLimitFatalError, RootMeanSquaredErrorMetric, _Image::rows, _Image::signature, ThrowBinaryException, ThrowFatalException, and TraceEvent.
Referenced by CompareImages(), and GetSimilarityMetric().
MagickExport double* GetImageDistortions | ( | Image * | image, |
const Image * | reconstruct_image, | ||
const MetricType | metric, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1238 of file compare.c.
References AbsoluteErrorMetric, AcquireQuantumMemory(), _Image::columns, _Image::debug, _Image::filename, FuzzErrorMetric, GetAbsoluteDistortion(), GetFuzzDistortion(), GetMagickModule, GetMeanAbsoluteDistortion(), GetMeanErrorPerPixel(), GetMeanSquaredDistortion(), GetNormalizedCrossCorrelationDistortion(), GetPeakAbsoluteDistortion(), GetPeakSignalToNoiseRatio(), GetRootMeanSquaredDistortion(), ImageError, LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, MaxPixelChannels, MeanAbsoluteErrorMetric, MeanErrorPerPixelMetric, MeanSquaredErrorMetric, NormalizedCrossCorrelationErrorMetric, PeakAbsoluteErrorMetric, PeakSignalToNoiseRatioMetric, RelinquishMagickMemory(), ResetMagickMemory(), ResourceLimitFatalError, RootMeanSquaredErrorMetric, _Image::rows, _Image::signature, ThrowFatalException, ThrowMagickException(), and TraceEvent.
|
static |
Definition at line 556 of file compare.c.
References AcquireVirtualCacheView(), _Image::columns, CompositePixelChannel, DestroyCacheView(), GetCacheViewVirtualPixels(), GetImageChannels(), GetPixelAlpha(), GetPixelChannel(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelReadMask(), MagickFalse, MagickTrue, MaxPixelChannels, QuantumScale, ResetMagickMemory(), _Image::rows, UndefinedPixelTrait, and UpdatePixelTrait.
Referenced by GetImageDistortion(), and GetImageDistortions().
|
static |
Definition at line 655 of file compare.c.
References AcquireVirtualCacheView(), _Image::columns, CompositePixelChannel, DestroyCacheView(), _Image::error, GetCacheViewVirtualPixels(), GetPixelAlpha(), GetPixelChannel(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelReadMask(), MagickFalse, MagickTrue, _ErrorInfo::mean_error_per_pixel, _ErrorInfo::normalized_maximum_error, _ErrorInfo::normalized_mean_error, QuantumScale, _Image::rows, UndefinedPixelTrait, and UpdatePixelTrait.
Referenced by GetImageDistortion(), and GetImageDistortions().
|
static |
Definition at line 747 of file compare.c.
References AcquireVirtualCacheView(), _Image::columns, CompositePixelChannel, DestroyCacheView(), GetCacheViewVirtualPixels(), GetImageChannels(), GetPixelAlpha(), GetPixelChannel(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelReadMask(), MagickFalse, MagickTrue, MaxPixelChannels, QuantumScale, ResetMagickMemory(), _Image::rows, UndefinedPixelTrait, and UpdatePixelTrait.
Referenced by GetImageDistortion(), GetImageDistortions(), GetPeakSignalToNoiseRatio(), and GetRootMeanSquaredDistortion().
|
static |
Definition at line 846 of file compare.c.
References AcquireVirtualCacheView(), _Image::columns, CompositePixelChannel, DestroyCacheView(), GetCacheViewVirtualPixels(), GetImageChannels(), GetImageStatistics(), GetPixelAlpha(), GetPixelChannel(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelReadMask(), MagickFalse, MagickTrue, MaxPixelChannels, _ChannelStatistics::mean, PerceptibleReciprocal(), _Image::progress_monitor, QuantumRange, QuantumScale, RelinquishMagickMemory(), _Image::rows, SetImageProgress(), SimilarityImageTag, _ChannelStatistics::standard_deviation, UndefinedPixelTrait, and UpdatePixelTrait.
Referenced by GetImageDistortion(), and GetImageDistortions().
|
static |
Definition at line 981 of file compare.c.
References AcquireVirtualCacheView(), _Image::columns, CompositePixelChannel, DestroyCacheView(), GetCacheViewVirtualPixels(), GetPixelAlpha(), GetPixelChannel(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelReadMask(), MagickFalse, MagickTrue, MaxPixelChannels, QuantumScale, ResetMagickMemory(), _Image::rows, UndefinedPixelTrait, and UpdatePixelTrait.
Referenced by GetImageDistortion(), and GetImageDistortions().
|
static |
Definition at line 1077 of file compare.c.
References GetMeanSquaredDistortion(), and MaxPixelChannels.
Referenced by GetImageDistortion(), and GetImageDistortions().
|
static |
Definition at line 1092 of file compare.c.
References GetMeanSquaredDistortion(), and MaxPixelChannels.
Referenced by GetImageDistortion(), and GetImageDistortions().
|
static |
Definition at line 1524 of file compare.c.
References CropImage(), DestroyImage(), GetImageDistortion(), MagickFalse, SetGeometry(), _RectangleInfo::x, and _RectangleInfo::y.
Referenced by SimilarityImage().
MagickExport MagickBooleanType IsImagesEqual | ( | Image * | image, |
const Image * | reconstruct_image, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1392 of file compare.c.
References AcquireVirtualCacheView(), _Image::columns, DestroyCacheView(), _Image::error, _Image::filename, GetCacheViewVirtualPixels(), GetPixelChannel(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelReadMask(), ImageError, MagickFalse, MagickSignature, MagickTrue, _ErrorInfo::mean_error_per_pixel, _ErrorInfo::normalized_maximum_error, _ErrorInfo::normalized_mean_error, QuantumScale, _Image::rows, _Image::signature, ThrowBinaryException, UndefinedPixelTrait, and UpdatePixelTrait.
|
inlinestatic |
Definition at line 310 of file compare.c.
Referenced by GetAbsoluteDistortion().
MagickExport Image* SimilarityImage | ( | Image * | image, |
const Image * | reference, | ||
const MetricType | metric, | ||
const double | similarity_threshold, | ||
RectangleInfo * | offset, | ||
double * | similarity_metric, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1555 of file compare.c.
References AcquireAuthenticCacheView(), ClampToQuantum(), CloneImage(), _Image::columns, DeactivateAlphaChannel, _Image::debug, DestroyCacheView(), DestroyImage(), DirectClass, _Image::filename, GetCacheViewAuthenticPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelReadMask(), GetSimilarityMetric(), ImageError, LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::progress_monitor, QuantumRange, _Image::rows, SetGeometry(), SetImageAlphaChannel(), SetImageProgress(), SetImageStorageClass(), SetPixelChannel(), _ExceptionInfo::signature, _Image::signature, SimilarityImageTag, SyncCacheViewAuthenticPixels(), ThrowImageException, TraceEvent, UndefinedPixelTrait, UpdatePixelTrait, _RectangleInfo::x, and _RectangleInfo::y.