#include "magick/studio.h"#include "magick/artifact.h"#include "magick/cache-view.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/resource_.h"#include "magick/string_.h"#include "magick/utility.h"#include "magick/version.h"
Go to the source code of this file.
Defines | |
| #define | SimilarityImageTag "Similarity/Image" |
Functions | |
| MagickExport Image * | CompareImages (Image *image, const Image *reconstruct_image, const MetricType metric, double *distortion, ExceptionInfo *exception) |
| 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 | GetAbsoluteError (const Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
| static size_t | GetNumberChannels (const Image *image, const ChannelType channel) |
| static MagickBooleanType | GetMeanAbsoluteError (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 | GetMeanSquaredError (const Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
| static MagickBooleanType | GetPeakAbsoluteError (const Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
| static MagickBooleanType | GetPeakSignalToNoiseRatio (const Image *image, const Image *reconstruct_image, const ChannelType channel, double *distortion, ExceptionInfo *exception) |
| static MagickBooleanType | GetRootMeanSquaredError (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 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) |
| #define SimilarityImageTag "Similarity/Image" |
Referenced by SimilarityImage().
| MagickExport Image* CompareImageChannels | ( | Image * | image, | |
| const Image * | reconstruct_image, | |||
| const ChannelType | channel, | |||
| const MetricType | metric, | |||
| double * | distortion, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 116 of file compare.c.
References AcquireCacheView(), AllChannels, BlueChannel, CloneImage(), CMYKColorspace, _Image::colorspace, _Image::columns, _Image::compose, CompositeImage(), ConvertRGBToCMYK(), _Image::debug, DestroyCacheView(), DestroyImage(), DirectClass, _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetImageArtifact(), GetImageChannelDistortion(), GetMagickModule, GetMagickPixelPacket(), GreenChannel, ImageError, IndexChannel, InheritException(), IsMagickColorSimilar(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::matte, OpacityChannel, OpaqueAlphaChannel, QueryMagickColor(), QueueCacheViewAuthenticPixels(), RedChannel, restrict, _Image::rows, SetImageAlphaChannel(), SetImageStorageClass(), SetMagickPixelPacket(), SetPixelPacket(), _Image::signature, SyncCacheViewAuthenticPixels(), ThrowImageException, and TraceEvent.
Referenced by CompareImages().
| 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 AllChannels, and CompareImageChannels().
| static MagickBooleanType GetAbsoluteError | ( | const Image * | image, | |
| const Image * | reconstruct_image, | |||
| const ChannelType | channel, | |||
| double * | distortion, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 348 of file compare.c.
References AcquireCacheView(), AllChannels, BlueChannel, CMYKColorspace, _Image::colorspace, _Image::columns, DestroyCacheView(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetMagickPixelPacket(), GreenChannel, IndexChannel, IsMagickColorSimilar(), MagickFalse, _Image::matte, OpacityChannel, RedChannel, ResetMagickMemory(), restrict, _Image::rows, and SetMagickPixelPacket().
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
| MagickExport MagickBooleanType GetImageChannelDistortion | ( | Image * | image, | |
| const Image * | reconstruct_image, | |||
| const ChannelType | channel, | |||
| const MetricType | metric, | |||
| double * | distortion, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 984 of file compare.c.
References AbsoluteErrorMetric, AcquireQuantumMemory(), AllChannels, _Image::columns, _Image::debug, _Image::filename, GetAbsoluteError(), GetMagickModule, GetMeanAbsoluteError(), GetMeanErrorPerPixel(), GetMeanSquaredError(), GetPeakAbsoluteError(), GetPeakSignalToNoiseRatio(), GetRootMeanSquaredError(), ImageError, LogMagickEvent(), MagickFalse, MagickSignature, MeanAbsoluteErrorMetric, MeanErrorPerPixelMetric, MeanSquaredErrorMetric, PeakAbsoluteErrorMetric, PeakSignalToNoiseRatioMetric, RelinquishMagickMemory(), ResetMagickMemory(), ResourceLimitFatalError, RootMeanSquaredErrorMetric, _Image::rows, _Image::signature, ThrowBinaryException, ThrowFatalException, and TraceEvent.
Referenced by CompareImageChannels(), and GetImageDistortion().
| MagickExport double* GetImageChannelDistortions | ( | Image * | image, | |
| const Image * | reconstruct_image, | |||
| const MetricType | metric, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 1103 of file compare.c.
References AbsoluteErrorMetric, AcquireQuantumMemory(), AllChannels, _Image::columns, _Image::debug, _Image::exception, _Image::filename, GetAbsoluteError(), GetMagickModule, GetMeanAbsoluteError(), GetMeanErrorPerPixel(), GetMeanSquaredError(), GetPeakAbsoluteError(), GetPeakSignalToNoiseRatio(), GetRootMeanSquaredError(), LogMagickEvent(), MagickFalse, MagickSignature, MeanAbsoluteErrorMetric, MeanErrorPerPixelMetric, MeanSquaredErrorMetric, PeakAbsoluteErrorMetric, PeakSignalToNoiseRatioMetric, ResetMagickMemory(), ResourceLimitFatalError, RootMeanSquaredErrorMetric, _Image::rows, _Image::signature, ThrowFatalException, ThrowMagickException(), and TraceEvent.
| MagickExport MagickBooleanType GetImageDistortion | ( | Image * | image, | |
| const Image * | reconstruct_image, | |||
| const MetricType | metric, | |||
| double * | distortion, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 336 of file compare.c.
References AllChannels, and GetImageChannelDistortion().
| static MagickBooleanType GetMeanAbsoluteError | ( | const Image * | image, | |
| const Image * | reconstruct_image, | |||
| const ChannelType | channel, | |||
| double * | distortion, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 468 of file compare.c.
References AcquireCacheView(), AllChannels, BlueChannel, CMYKColorspace, _Image::colorspace, _Image::columns, DestroyCacheView(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetNumberChannels(), GreenChannel, IndexChannel, MagickFalse, _Image::matte, OpacityChannel, QuantumScale, RedChannel, ResetMagickMemory(), restrict, and _Image::rows.
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
| static MagickBooleanType GetMeanErrorPerPixel | ( | Image * | image, | |
| const Image * | reconstruct_image, | |||
| const ChannelType | channel, | |||
| double * | distortion, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 576 of file compare.c.
References AcquireCacheView(), BlueChannel, CMYKColorspace, _Image::colorspace, _Image::columns, DestroyCacheView(), _Image::error, GetAlphaPixelComponent, GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GreenChannel, IndexChannel, MagickFalse, _Image::matte, _ErrorInfo::mean_error_per_pixel, _ErrorInfo::normalized_maximum_error, _ErrorInfo::normalized_mean_error, OpacityChannel, QuantumScale, RedChannel, restrict, and _Image::rows.
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
| static MagickBooleanType GetMeanSquaredError | ( | const Image * | image, | |
| const Image * | reconstruct_image, | |||
| const ChannelType | channel, | |||
| double * | distortion, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 705 of file compare.c.
References AcquireCacheView(), AllChannels, BlueChannel, CMYKColorspace, _Image::colorspace, _Image::columns, DestroyCacheView(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetNumberChannels(), GreenChannel, IndexChannel, MagickFalse, _Image::matte, OpacityChannel, QuantumScale, RedChannel, ResetMagickMemory(), restrict, and _Image::rows.
Referenced by GetImageChannelDistortion(), GetImageChannelDistortions(), GetPeakSignalToNoiseRatio(), and GetRootMeanSquaredError().
| static size_t GetNumberChannels | ( | const Image * | image, | |
| const ChannelType | channel | |||
| ) | [static] |
Definition at line 446 of file compare.c.
References BlueChannel, CMYKColorspace, _Image::colorspace, GreenChannel, IndexChannel, MagickFalse, _Image::matte, OpacityChannel, and RedChannel.
Referenced by GetMeanAbsoluteError(), GetMeanSquaredError(), and GetSimilarityMetric().
| static MagickBooleanType GetPeakAbsoluteError | ( | const Image * | image, | |
| const Image * | reconstruct_image, | |||
| const ChannelType | channel, | |||
| double * | distortion, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 814 of file compare.c.
References AcquireCacheView(), AllChannels, BlackChannel, BlueChannel, CMYKColorspace, _Image::colorspace, _Image::columns, DestroyCacheView(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GreenChannel, IndexChannel, MagickFalse, _Image::matte, OpacityChannel, QuantumScale, RedChannel, ResetMagickMemory(), restrict, and _Image::rows.
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
| static MagickBooleanType GetPeakSignalToNoiseRatio | ( | const Image * | image, | |
| const Image * | reconstruct_image, | |||
| const ChannelType | channel, | |||
| double * | distortion, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 928 of file compare.c.
References AllChannels, BlackChannel, BlueChannel, CMYKColorspace, _Image::colorspace, GetMeanSquaredError(), GreenChannel, IndexChannel, MagickFalse, _Image::matte, OpacityChannel, and RedChannel.
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
| static MagickBooleanType GetRootMeanSquaredError | ( | const Image * | image, | |
| const Image * | reconstruct_image, | |||
| const ChannelType | channel, | |||
| double * | distortion, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 959 of file compare.c.
References AllChannels, BlackChannel, BlueChannel, CMYKColorspace, _Image::colorspace, GetMeanSquaredError(), GreenChannel, IndexChannel, MagickFalse, _Image::matte, OpacityChannel, and RedChannel.
Referenced by GetImageChannelDistortion(), and GetImageChannelDistortions().
| static double GetSimilarityMetric | ( | const Image * | image, | |
| const Image * | reference, | |||
| const ssize_t | x_offset, | |||
| const ssize_t | y_offset, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 1384 of file compare.c.
References AcquireCacheView(), AllChannels, CMYKColorspace, _Image::colorspace, _Image::columns, DestroyCacheView(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetNumberChannels(), MagickFalse, _Image::matte, QuantumScale, restrict, and _Image::rows.
Referenced by SimilarityImage().
| MagickExport MagickBooleanType IsImagesEqual | ( | Image * | image, | |
| const Image * | reconstruct_image | |||
| ) |
Definition at line 1237 of file compare.c.
References AcquireCacheView(), CMYKColorspace, _Image::colorspace, _Image::columns, DestroyCacheView(), _Image::error, _Image::exception, _Image::filename, GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), ImageError, MagickFalse, MagickSignature, MagickTrue, _Image::matte, _ErrorInfo::mean_error_per_pixel, _ErrorInfo::normalized_maximum_error, _ErrorInfo::normalized_mean_error, QuantumScale, restrict, _Image::rows, _Image::signature, and ThrowBinaryException.
| MagickExport Image* SimilarityImage | ( | Image * | image, | |
| const Image * | reference, | |||
| RectangleInfo * | offset, | |||
| double * | similarity_metric, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 1474 of file compare.c.
References AcquireCacheView(), ClampToQuantum(), CloneImage(), _Image::columns, _Image::debug, DestroyCacheView(), DestroyImage(), DirectClass, _Image::exception, _Image::filename, GetCacheViewAuthenticPixels(), GetMagickModule, GetSimilarityMetric(), ImageError, InheritException(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::progress_monitor, QuantumRange, restrict, _Image::rows, SetGeometry(), SetImageProgress(), SetImageStorageClass(), _ExceptionInfo::signature, _Image::signature, SimilarityImageTag, SyncCacheViewAuthenticPixels(), ThrowImageException, TraceEvent, _RectangleInfo::x, and _RectangleInfo::y.
1.7.1