|
MagickCore
6.7.5
|
#include "MagickCore/studio.h"#include "MagickCore/artifact.h"#include "MagickCore/cache-view.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/transform.h"#include "MagickCore/utility.h"#include "MagickCore/version.h"
Go to the source code of this file.
Defines | |
| #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 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, 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 103 of file compare.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _Image::columns, _Image::rows, ThrowImageException, ImageError, GetImageDistortion(), CloneImage(), MagickTrue, SetImageAlphaChannel(), OpaqueAlphaChannel, DestroyImage(), SetImageStorageClass(), DirectClass, QueryColorCompliance(), AllCompliance, GetImageArtifact(), AcquireCacheView(), GetCacheViewVirtualPixels(), QueueCacheViewAuthenticPixels(), GetPixelMask(), SetPixelInfoPixel(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, GetPixelChannel(), MagickEpsilon, SyncCacheViewAuthenticPixels(), DestroyCacheView(), CompositeImage(), and _Image::compose.
| static MagickBooleanType GetAbsoluteDistortion | ( | const Image * | image, |
| const Image * | reconstruct_image, | ||
| double * | distortion, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 308 of file compare.c.
References MagickTrue, AcquireCacheView(), _Image::rows, MaxPixelChannels, MagickFalse, GetCacheViewVirtualPixels(), _Image::columns, ResetMagickMemory(), GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, GetPixelChannel(), CompositePixelChannel, and DestroyCacheView().
Referenced by GetImageDistortion(), and GetImageDistortions().
| static MagickBooleanType GetFuzzDistortion | ( | const Image * | image, |
| const Image * | reconstruct_image, | ||
| double * | distortion, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 432 of file compare.c.
References MagickTrue, AcquireCacheView(), _Image::rows, MaxPixelChannels, MagickFalse, GetCacheViewVirtualPixels(), _Image::columns, ResetMagickMemory(), GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, QuantumScale, GetPixelChannel(), CompositePixelChannel, DestroyCacheView(), and GetImageChannels().
Referenced by GetImageDistortion(), and GetImageDistortions().
| static size_t GetImageChannels | ( | const Image * | image | ) | [static] |
Definition at line 407 of file compare.c.
References GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), 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 1088 of file compare.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _Image::columns, _Image::rows, ThrowBinaryException, ImageError, MaxPixelChannels, AcquireQuantumMemory(), ThrowFatalException, ResourceLimitFatalError, ResetMagickMemory(), AbsoluteErrorMetric, GetAbsoluteDistortion(), FuzzErrorMetric, GetFuzzDistortion(), MeanAbsoluteErrorMetric, GetMeanAbsoluteDistortion(), MeanErrorPerPixelMetric, GetMeanErrorPerPixel(), MeanSquaredErrorMetric, GetMeanSquaredDistortion(), NormalizedCrossCorrelationErrorMetric, GetNormalizedCrossCorrelationDistortion(), PeakAbsoluteErrorMetric, GetPeakAbsoluteDistortion(), PeakSignalToNoiseRatioMetric, GetPeakSignalToNoiseRatio(), RootMeanSquaredErrorMetric, GetRootMeanSquaredDistortion(), CompositePixelChannel, and RelinquishMagickMemory().
Referenced by CompareImages(), and GetSimilarityMetric().
| MagickExport double* GetImageDistortions | ( | Image * | image, |
| const Image * | reconstruct_image, | ||
| const MetricType | metric, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1219 of file compare.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _Image::columns, _Image::rows, ThrowMagickException(), ImageError, MaxPixelChannels, AcquireQuantumMemory(), ThrowFatalException, ResourceLimitFatalError, ResetMagickMemory(), MagickTrue, AbsoluteErrorMetric, GetAbsoluteDistortion(), FuzzErrorMetric, GetFuzzDistortion(), MeanAbsoluteErrorMetric, GetMeanAbsoluteDistortion(), MeanErrorPerPixelMetric, GetMeanErrorPerPixel(), MeanSquaredErrorMetric, GetMeanSquaredDistortion(), NormalizedCrossCorrelationErrorMetric, GetNormalizedCrossCorrelationDistortion(), PeakAbsoluteErrorMetric, GetPeakAbsoluteDistortion(), PeakSignalToNoiseRatioMetric, GetPeakSignalToNoiseRatio(), RootMeanSquaredErrorMetric, GetRootMeanSquaredDistortion(), and RelinquishMagickMemory().
| static MagickBooleanType GetMeanAbsoluteDistortion | ( | const Image * | image, |
| const Image * | reconstruct_image, | ||
| double * | distortion, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 532 of file compare.c.
References MagickTrue, AcquireCacheView(), _Image::rows, MaxPixelChannels, MagickFalse, GetCacheViewVirtualPixels(), _Image::columns, ResetMagickMemory(), GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, QuantumScale, GetPixelChannel(), CompositePixelChannel, DestroyCacheView(), and GetImageChannels().
Referenced by GetImageDistortion(), and GetImageDistortions().
| static MagickBooleanType GetMeanErrorPerPixel | ( | Image * | image, |
| const Image * | reconstruct_image, | ||
| double * | distortion, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 630 of file compare.c.
References MagickTrue, AcquireCacheView(), _Image::rows, GetCacheViewVirtualPixels(), _Image::columns, MagickFalse, GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, GetPixelChannel(), CompositePixelChannel, DestroyCacheView(), _Image::error, _ErrorInfo::mean_error_per_pixel, _ErrorInfo::normalized_mean_error, QuantumScale, and _ErrorInfo::normalized_maximum_error.
Referenced by GetImageDistortion(), and GetImageDistortions().
| static MagickBooleanType GetMeanSquaredDistortion | ( | const Image * | image, |
| const Image * | reconstruct_image, | ||
| double * | distortion, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 726 of file compare.c.
References MagickTrue, AcquireCacheView(), _Image::rows, MaxPixelChannels, MagickFalse, GetCacheViewVirtualPixels(), _Image::columns, ResetMagickMemory(), GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, QuantumScale, GetPixelChannel(), CompositePixelChannel, DestroyCacheView(), and GetImageChannels().
Referenced by GetPeakSignalToNoiseRatio(), GetRootMeanSquaredDistortion(), GetImageDistortion(), and GetImageDistortions().
| static MagickBooleanType GetNormalizedCrossCorrelationDistortion | ( | const Image * | image, |
| const Image * | reconstruct_image, | ||
| double * | distortion, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 825 of file compare.c.
References GetImageStatistics(), MagickTrue, MaxPixelChannels, _Image::columns, _Image::rows, AcquireCacheView(), MagickFalse, GetCacheViewVirtualPixels(), GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, QuantumScale, _ChannelStatistics::mean, GetPixelChannel(), _Image::progress_monitor, SetImageProgress(), SimilarityImageTag, DestroyCacheView(), CompositePixelChannel, _ChannelStatistics::standard_deviation, MagickEpsilon, QuantumRange, GetImageChannels(), and RelinquishMagickMemory().
Referenced by GetImageDistortion(), and GetImageDistortions().
| static MagickBooleanType GetPeakAbsoluteDistortion | ( | const Image * | image, |
| const Image * | reconstruct_image, | ||
| double * | distortion, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 963 of file compare.c.
References MagickTrue, AcquireCacheView(), _Image::rows, MaxPixelChannels, MagickFalse, GetCacheViewVirtualPixels(), _Image::columns, ResetMagickMemory(), GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, QuantumScale, GetPixelChannel(), CompositePixelChannel, and DestroyCacheView().
Referenced by GetImageDistortion(), and GetImageDistortions().
| static MagickBooleanType GetPeakSignalToNoiseRatio | ( | const Image * | image, |
| const Image * | reconstruct_image, | ||
| double * | distortion, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 1058 of file compare.c.
References GetMeanSquaredDistortion(), and MaxPixelChannels.
Referenced by GetImageDistortion(), and GetImageDistortions().
| static MagickBooleanType GetRootMeanSquaredDistortion | ( | const Image * | image, |
| const Image * | reconstruct_image, | ||
| double * | distortion, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 1073 of file compare.c.
References GetMeanSquaredDistortion(), and MaxPixelChannels.
Referenced by GetImageDistortion(), and GetImageDistortions().
| static double GetSimilarityMetric | ( | const Image * | image, |
| const Image * | reference, | ||
| const MetricType | metric, | ||
| const ssize_t | x_offset, | ||
| const ssize_t | y_offset, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 1509 of file compare.c.
References SetGeometry(), _RectangleInfo::x, _RectangleInfo::y, CropImage(), GetImageDistortion(), DestroyImage(), and MagickFalse.
Referenced by SimilarityImage().
| MagickExport MagickBooleanType IsImagesEqual | ( | Image * | image, |
| const Image * | reconstruct_image, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1373 of file compare.c.
References _Image::signature, MagickSignature, _Image::columns, _Image::rows, ThrowBinaryException, ImageError, _Image::filename, AcquireCacheView(), GetCacheViewVirtualPixels(), GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, GetPixelChannel(), DestroyCacheView(), _Image::error, _ErrorInfo::mean_error_per_pixel, _ErrorInfo::normalized_mean_error, QuantumScale, _ErrorInfo::normalized_maximum_error, MagickTrue, and MagickFalse.
| MagickExport Image* SimilarityImage | ( | Image * | image, |
| const Image * | reference, | ||
| const MetricType | metric, | ||
| RectangleInfo * | offset, | ||
| double * | similarity_metric, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1540 of file compare.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, SetGeometry(), _Image::columns, _Image::rows, ThrowImageException, ImageError, CloneImage(), MagickTrue, SetImageStorageClass(), DirectClass, DestroyImage(), AcquireCacheView(), GetCacheViewAuthenticPixels(), GetSimilarityMetric(), _RectangleInfo::x, _RectangleInfo::y, GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, SetPixelChannel(), ClampToQuantum(), QuantumRange, SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), SimilarityImageTag, and DestroyCacheView().