|
MagickCore
6.7.5
|
#include "MagickCore/studio.h"#include "MagickCore/property.h"#include "MagickCore/animate.h"#include "MagickCore/blob.h"#include "MagickCore/blob-private.h"#include "MagickCore/cache.h"#include "MagickCore/cache-private.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/composite.h"#include "MagickCore/composite-private.h"#include "MagickCore/compress.h"#include "MagickCore/constitute.h"#include "MagickCore/display.h"#include "MagickCore/draw.h"#include "MagickCore/enhance.h"#include "MagickCore/exception.h"#include "MagickCore/exception-private.h"#include "MagickCore/gem.h"#include "MagickCore/gem-private.h"#include "MagickCore/geometry.h"#include "MagickCore/list.h"#include "MagickCore/image-private.h"#include "MagickCore/magic.h"#include "MagickCore/magick.h"#include "MagickCore/memory_.h"#include "MagickCore/module.h"#include "MagickCore/monitor.h"#include "MagickCore/monitor-private.h"#include "MagickCore/option.h"#include "MagickCore/paint.h"#include "MagickCore/pixel-accessor.h"#include "MagickCore/profile.h"#include "MagickCore/quantize.h"#include "MagickCore/quantum-private.h"#include "MagickCore/random_.h"#include "MagickCore/random-private.h"#include "MagickCore/segment.h"#include "MagickCore/semaphore.h"#include "MagickCore/signature-private.h"#include "MagickCore/statistic.h"#include "MagickCore/string_.h"#include "MagickCore/thread-private.h"#include "MagickCore/timer.h"#include "MagickCore/utility.h"#include "MagickCore/version.h"Go to the source code of this file.
Data Structures | |
| struct | _PixelChannels |
| struct | _SkipNode |
| struct | _SkipList |
| struct | _PixelList |
Defines | |
| #define | EvaluateImageTag "Evaluate/Image" |
| #define | FunctionImageTag "Function/Image " |
| #define | StatisticImageTag "Statistic/Image" |
Typedefs | |
| typedef struct _PixelChannels | PixelChannels |
| typedef struct _SkipNode | SkipNode |
| typedef struct _SkipList | SkipList |
| typedef struct _PixelList | PixelList |
Functions | |
| static PixelChannels ** | DestroyPixelThreadSet (PixelChannels **pixels) |
| static PixelChannels ** | AcquirePixelThreadSet (const Image *image, const size_t number_images) |
| static double | EvaluateMax (const double x, const double y) |
| static int | IntensityCompare (const void *x, const void *y) |
| static double | MagickMin (const double x, const double y) |
| static MagickRealType | ApplyEvaluateOperator (RandomInfo *random_info, Quantum pixel, const MagickEvaluateOperator op, const MagickRealType value) |
| MagickExport Image * | EvaluateImages (const Image *images, const MagickEvaluateOperator op, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | EvaluateImage (Image *image, const MagickEvaluateOperator op, const double value, ExceptionInfo *exception) |
| static Quantum | ApplyFunction (Quantum pixel, const MagickFunction function, const size_t number_parameters, const double *parameters, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | FunctionImage (Image *image, const MagickFunction function, const size_t number_parameters, const double *parameters, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | GetImageExtrema (const Image *image, size_t *minima, size_t *maxima, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | GetImageMean (const Image *image, double *mean, double *standard_deviation, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | GetImageKurtosis (const Image *image, double *kurtosis, double *skewness, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | GetImageRange (const Image *image, double *minima, double *maxima, ExceptionInfo *exception) |
| static size_t | GetImageChannels (const Image *image) |
| MagickExport ChannelStatistics * | GetImageStatistics (const Image *image, ExceptionInfo *exception) |
| static PixelList * | DestroyPixelList (PixelList *pixel_list) |
| static PixelList ** | DestroyPixelListThreadSet (PixelList **pixel_list) |
| static PixelList * | AcquirePixelList (const size_t width, const size_t height) |
| static PixelList ** | AcquirePixelListThreadSet (const size_t width, const size_t height) |
| static void | AddNodePixelList (PixelList *pixel_list, const size_t color) |
| static void | GetMaximumPixelList (PixelList *pixel_list, Quantum *pixel) |
| static void | GetMeanPixelList (PixelList *pixel_list, Quantum *pixel) |
| static void | GetMedianPixelList (PixelList *pixel_list, Quantum *pixel) |
| static void | GetMinimumPixelList (PixelList *pixel_list, Quantum *pixel) |
| static void | GetModePixelList (PixelList *pixel_list, Quantum *pixel) |
| static void | GetNonpeakPixelList (PixelList *pixel_list, Quantum *pixel) |
| static void | GetStandardDeviationPixelList (PixelList *pixel_list, Quantum *pixel) |
| static void | InsertPixelList (const Image *image, const Quantum pixel, PixelList *pixel_list) |
| static MagickRealType | MagickAbsoluteValue (const MagickRealType x) |
| static size_t | MagickMax (const size_t x, const size_t y) |
| static void | ResetPixelList (PixelList *pixel_list) |
| MagickExport Image * | StatisticImage (const Image *image, const StatisticType type, const size_t width, const size_t height, ExceptionInfo *exception) |
| #define EvaluateImageTag "Evaluate/Image" |
| #define FunctionImageTag "Function/Image " |
Referenced by FunctionImage().
| #define StatisticImageTag "Statistic/Image" |
Referenced by StatisticImage().
| typedef struct _PixelChannels PixelChannels |
| typedef struct _PixelList PixelList |
| static PixelList* AcquirePixelList | ( | const size_t | width, |
| const size_t | height | ||
| ) | [static] |
Definition at line 1809 of file statistic.c.
References AcquireMagickMemory(), ResetMagickMemory(), _PixelList::length, _PixelList::skip_list, _SkipList::nodes, AcquireQuantumMemory(), DestroyPixelList(), _PixelList::signature, and MagickSignature.
Referenced by AcquirePixelListThreadSet().
| static PixelList** AcquirePixelListThreadSet | ( | const size_t | width, |
| const size_t | height | ||
| ) | [static] |
Definition at line 1829 of file statistic.c.
References GetOpenMPMaximumThreads(), AcquireQuantumMemory(), ResetMagickMemory(), AcquirePixelList(), and DestroyPixelListThreadSet().
Referenced by StatisticImage().
| static PixelChannels** AcquirePixelThreadSet | ( | const Image * | image, |
| const size_t | number_images | ||
| ) | [static] |
Definition at line 150 of file statistic.c.
References GetOpenMPMaximumThreads(), AcquireQuantumMemory(), ResetMagickMemory(), _Image::columns, DestroyPixelThreadSet(), and MaxPixelChannels.
Referenced by EvaluateImages().
| static void AddNodePixelList | ( | PixelList * | pixel_list, |
| const size_t | color | ||
| ) | [static] |
Definition at line 1856 of file statistic.c.
References _PixelList::skip_list, _SkipList::nodes, _SkipNode::signature, _PixelList::signature, _SkipNode::count, _SkipList::level, _SkipNode::next, and _PixelList::seed.
Referenced by InsertPixelList().
| static MagickRealType ApplyEvaluateOperator | ( | RandomInfo * | random_info, |
| Quantum | pixel, | ||
| const MagickEvaluateOperator | op, | ||
| const MagickRealType | value | ||
| ) | [static] |
Definition at line 234 of file statistic.c.
References UndefinedEvaluateOperator, AbsEvaluateOperator, AddEvaluateOperator, AddModulusEvaluateOperator, QuantumRange, AndEvaluateOperator, CosineEvaluateOperator, MagickPI, QuantumScale, DivideEvaluateOperator, ExponentialEvaluateOperator, GaussianNoiseEvaluateOperator, GenerateDifferentialNoise(), GaussianNoise, ImpulseNoiseEvaluateOperator, ImpulseNoise, LaplacianNoiseEvaluateOperator, LaplacianNoise, LeftShiftEvaluateOperator, LogEvaluateOperator, MaxEvaluateOperator, EvaluateMax(), MeanEvaluateOperator, MedianEvaluateOperator, MinEvaluateOperator, MagickMin(), MultiplicativeNoiseEvaluateOperator, MultiplicativeGaussianNoise, MultiplyEvaluateOperator, OrEvaluateOperator, PoissonNoiseEvaluateOperator, PoissonNoise, PowEvaluateOperator, RightShiftEvaluateOperator, SetEvaluateOperator, SineEvaluateOperator, SubtractEvaluateOperator, SumEvaluateOperator, ThresholdEvaluateOperator, ThresholdBlackEvaluateOperator, ThresholdWhiteEvaluateOperator, UniformNoiseEvaluateOperator, UniformNoise, and XorEvaluateOperator.
Referenced by EvaluateImages(), and EvaluateImage().
| static Quantum ApplyFunction | ( | Quantum | pixel, |
| const MagickFunction | function, | ||
| const size_t | number_parameters, | ||
| const double * | parameters, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 913 of file statistic.c.
References PolynomialFunction, QuantumScale, QuantumRange, SinusoidFunction, MagickPI, ArcsinFunction, ArctanFunction, UndefinedFunction, and ClampToQuantum().
Referenced by FunctionImage().
Definition at line 1785 of file statistic.c.
References _PixelList::skip_list, _SkipList::nodes, and RelinquishMagickMemory().
Referenced by DestroyPixelListThreadSet(), and AcquirePixelList().
Definition at line 1796 of file statistic.c.
References GetOpenMPMaximumThreads(), DestroyPixelList(), and RelinquishMagickMemory().
Referenced by AcquirePixelListThreadSet(), and StatisticImage().
| static PixelChannels** DestroyPixelThreadSet | ( | PixelChannels ** | pixels | ) | [static] |
Definition at line 137 of file statistic.c.
References GetOpenMPMaximumThreads(), and RelinquishMagickMemory().
Referenced by AcquirePixelThreadSet(), and EvaluateImages().
| MagickExport MagickBooleanType EvaluateImage | ( | Image * | image, |
| const MagickEvaluateOperator | op, | ||
| const double | value, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 780 of file statistic.c.
References random_info, _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, SetImageStorageClass(), DirectClass, MagickTrue, AcquireRandomInfoThreadSet(), AcquireCacheView(), _Image::rows, GetOpenMPThreadId(), GetCacheViewAuthenticPixels(), _Image::columns, GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, ClampToQuantum(), ApplyEvaluateOperator(), SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), EvaluateImageTag, DestroyCacheView(), and DestroyRandomInfoThreadSet().
Referenced by FloodfillPaintImage().
| MagickExport Image* EvaluateImages | ( | const Image * | images, |
| const MagickEvaluateOperator | op, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 424 of file statistic.c.
References random_info, _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, GetNextImageInList(), _Image::columns, _Image::rows, ThrowMagickException(), OptionError, CloneImage(), MagickTrue, SetImageStorageClass(), DirectClass, DestroyImage(), GetImageListLength(), AcquirePixelThreadSet(), ResourceLimitError, AcquireRandomInfoThreadSet(), AcquireCacheView(), MedianEvaluateOperator, GetOpenMPThreadId(), QueueCacheViewAuthenticPixels(), MaxPixelChannels, GetCacheViewVirtualPixels(), DestroyCacheView(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, _PixelChannels::channel, ApplyEvaluateOperator(), GetPixelChannel(), IntensityCompare(), ClampToQuantum(), SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), EvaluateImageTag, GetPixelMask(), AddEvaluateOperator, MeanEvaluateOperator, MultiplyEvaluateOperator, QuantumScale, DestroyPixelThreadSet(), and DestroyRandomInfoThreadSet().
| static double EvaluateMax | ( | const double | x, |
| const double | y | ||
| ) | [inline, static] |
Definition at line 192 of file statistic.c.
Referenced by ApplyEvaluateOperator(), and GetImageStatistics().
| MagickExport MagickBooleanType FunctionImage | ( | Image * | image, |
| const MagickFunction | function, | ||
| const size_t | number_parameters, | ||
| const double * | parameters, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1011 of file statistic.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, SetImageStorageClass(), DirectClass, MagickTrue, AcquireCacheView(), _Image::rows, GetCacheViewAuthenticPixels(), _Image::columns, GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, ApplyFunction(), SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), FunctionImageTag, and DestroyCacheView().
Referenced by BrightnessContrastImage().
| static size_t GetImageChannels | ( | const Image * | image | ) | [static] |
Definition at line 1525 of file statistic.c.
References GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), and UpdatePixelTrait.
Referenced by GetImageStatistics().
| MagickExport MagickBooleanType GetImageExtrema | ( | const Image * | image, |
| size_t * | minima, | ||
| size_t * | maxima, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1136 of file statistic.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, and GetImageRange().
| MagickExport MagickBooleanType GetImageKurtosis | ( | const Image * | image, |
| double * | kurtosis, | ||
| double * | skewness, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1269 of file statistic.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, MagickTrue, AcquireCacheView(), _Image::rows, GetCacheViewVirtualPixels(), _Image::columns, GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, and DestroyCacheView().
Referenced by FxChannelStatistics(), and GetMagickProperty().
| MagickExport MagickBooleanType GetImageMean | ( | const Image * | image, |
| double * | mean, | ||
| double * | standard_deviation, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1186 of file statistic.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, GetImageStatistics(), CompositePixelChannel, _ChannelStatistics::mean, _ChannelStatistics::standard_deviation, GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, _ChannelStatistics::variance, RelinquishMagickMemory(), and MagickTrue.
Referenced by AutoGammaImage(), FxChannelStatistics(), and GetMagickProperty().
| MagickExport MagickBooleanType GetImageRange | ( | const Image * | image, |
| double * | minima, | ||
| double * | maxima, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1411 of file statistic.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, MagickTrue, MagickHuge, AcquireCacheView(), _Image::rows, GetCacheViewVirtualPixels(), _Image::columns, GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, UpdatePixelTrait, and DestroyCacheView().
Referenced by FxChannelStatistics(), MinMaxStretchImage(), GetMagickProperty(), and GetImageExtrema().
| MagickExport ChannelStatistics* GetImageStatistics | ( | const Image * | image, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1550 of file statistic.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, AcquireQuantumMemory(), MaxPixelChannels, ThrowFatalException, ResourceLimitFatalError, ResetMagickMemory(), _ChannelStatistics::depth, _ChannelStatistics::maxima, MagickHuge, _ChannelStatistics::minima, _Image::rows, GetVirtualPixels(), _Image::columns, GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, MAGICKCORE_QUANTUM_DEPTH, GetQuantumRange(), ScaleAnyToQuantum(), ScaleQuantumToAny(), MagickTrue, _ChannelStatistics::sum, _ChannelStatistics::sum_squared, _ChannelStatistics::sum_cubed, _ChannelStatistics::sum_fourth_power, _ChannelStatistics::mean, _ChannelStatistics::variance, _ChannelStatistics::standard_deviation, CompositePixelChannel, EvaluateMax(), MagickMin(), GetImageChannels(), _ChannelStatistics::kurtosis, and _ChannelStatistics::skewness.
Referenced by GetNormalizedCrossCorrelationDistortion(), IdentifyImage(), and GetImageMean().
Definition at line 1915 of file statistic.c.
References _PixelList::skip_list, _SkipList::nodes, _SkipNode::next, _SkipNode::count, and _PixelList::length.
Referenced by StatisticImage().
Definition at line 1944 of file statistic.c.
References _PixelList::skip_list, _SkipList::nodes, _SkipNode::next, _SkipNode::count, and _PixelList::length.
Referenced by StatisticImage().
Definition at line 1975 of file statistic.c.
References _PixelList::skip_list, _SkipList::nodes, _SkipNode::next, _SkipNode::count, and _PixelList::length.
Referenced by StatisticImage().
Definition at line 2000 of file statistic.c.
References _PixelList::skip_list, _SkipList::nodes, _SkipNode::next, _SkipNode::count, and _PixelList::length.
Referenced by StatisticImage().
Definition at line 2029 of file statistic.c.
References _PixelList::skip_list, _SkipList::nodes, _SkipNode::count, _SkipNode::next, and _PixelList::length.
Referenced by StatisticImage().
Definition at line 2063 of file statistic.c.
References _PixelList::skip_list, _SkipList::nodes, _SkipNode::next, _SkipNode::count, and _PixelList::length.
Referenced by StatisticImage().
| static void GetStandardDeviationPixelList | ( | PixelList * | pixel_list, |
| Quantum * | pixel | ||
| ) | [inline, static] |
Definition at line 2098 of file statistic.c.
References _PixelList::skip_list, _SkipList::nodes, _SkipNode::next, _SkipNode::count, and _PixelList::length.
Referenced by StatisticImage().
| static void InsertPixelList | ( | const Image * | image, |
| const Quantum | pixel, | ||
| PixelList * | pixel_list | ||
| ) | [inline, static] |
Definition at line 2138 of file statistic.c.
References _PixelList::skip_list, _SkipList::nodes, _SkipNode::signature, _PixelList::signature, _SkipNode::count, and AddNodePixelList().
Referenced by StatisticImage().
| static int IntensityCompare | ( | const void * | x, |
| const void * | y | ||
| ) | [static] |
Definition at line 203 of file statistic.c.
References MaxPixelChannels, and _PixelChannels::channel.
Referenced by EvaluateImages().
| static MagickRealType MagickAbsoluteValue | ( | const MagickRealType | x | ) | [inline, static] |
Definition at line 2157 of file statistic.c.
Referenced by StatisticImage().
| static size_t MagickMax | ( | const size_t | x, |
| const size_t | y | ||
| ) | [inline, static] |
Definition at line 2164 of file statistic.c.
Referenced by StatisticImage().
| static double MagickMin | ( | const double | x, |
| const double | y | ||
| ) | [inline, static] |
Definition at line 227 of file statistic.c.
Referenced by ApplyEvaluateOperator(), and GetImageStatistics().
| static void ResetPixelList | ( | PixelList * | pixel_list | ) | [static] |
Definition at line 2171 of file statistic.c.
References _PixelList::skip_list, _SkipList::nodes, _SkipList::level, _SkipNode::next, _PixelList::seed, and _PixelList::signature.
Referenced by StatisticImage().
| MagickExport Image* StatisticImage | ( | const Image * | image, |
| const StatisticType | type, | ||
| const size_t | width, | ||
| const size_t | height, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 2193 of file statistic.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, CloneImage(), _Image::columns, _Image::rows, MagickTrue, SetImageStorageClass(), DirectClass, DestroyImage(), AcquirePixelListThreadSet(), MagickMax(), ThrowImageException, ResourceLimitError, GetPixelChannels(), AcquireCacheView(), GetOpenMPThreadId(), GetCacheViewVirtualPixels(), QueueCacheViewAuthenticPixels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, CopyPixelTrait, GetPixelMask(), SetPixelChannel(), ResetPixelList(), InsertPixelList(), GradientStatistic, GetMinimumPixelList(), GetMaximumPixelList(), ClampToQuantum(), MagickAbsoluteValue(), MaximumStatistic, MeanStatistic, GetMeanPixelList(), MedianStatistic, GetMedianPixelList(), MinimumStatistic, ModeStatistic, GetModePixelList(), NonpeakStatistic, GetNonpeakPixelList(), StandardDeviationStatistic, GetStandardDeviationPixelList(), SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), StatisticImageTag, DestroyCacheView(), and DestroyPixelListThreadSet().
Referenced by PreviewImage(), and DeskewImage().