MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
|
#include "MagickCore/studio.h"
#include "MagickCore/artifact.h"
#include "MagickCore/cache-view.h"
#include "MagickCore/channel.h"
#include "MagickCore/color-private.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/image.h"
#include "MagickCore/image-private.h"
#include "MagickCore/linked-list.h"
#include "MagickCore/list.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
#include "MagickCore/memory-private.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/morphology.h"
#include "MagickCore/morphology-private.h"
#include "MagickCore/option.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/prepress.h"
#include "MagickCore/quantize.h"
#include "MagickCore/resource_.h"
#include "MagickCore/registry.h"
#include "MagickCore/semaphore.h"
#include "MagickCore/splay-tree.h"
#include "MagickCore/statistic.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/token.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
Go to the source code of this file.
Macros | |
#define | Minimize(assign, value) assign=MagickMin(assign,value) |
#define | Maximize(assign, value) assign=MagickMax(assign,value) |
#define | KernelRank 3 |
#define | KernelRank 3 |
#define | MorphologyTag "Morphology/Image" |
#define KernelRank 3 |
#define KernelRank 3 |
#define Maximize | ( | assign, | |
value | |||
) | assign=MagickMax(assign,value) |
Definition at line 92 of file morphology.c.
#define Minimize | ( | assign, | |
value | |||
) | assign=MagickMin(assign,value) |
Definition at line 91 of file morphology.c.
#define MorphologyTag "Morphology/Image" |
MagickExport KernelInfo * AcquireKernelBuiltIn | ( | const KernelInfoType | type, |
const GeometryInfo * | args, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 950 of file morphology.c.
References AcquireAlignedMemory(), AcquireKernelInfo(), AcquireMagickMemory(), _KernelInfo::angle, BinomialKernel, BlurKernel, CalcKernelMetaData(), ChebyshevKernel, CometKernel, CompassKernel, ConvexHullKernel, CornersKernel, CorrelateNormalizeValue, CrossKernel, DestroyKernelInfo(), DiagonalsKernel, DiamondKernel, DiskKernel, DoGKernel, EdgesKernel, EuclideanKernel, ExpandMirrorKernelInfo(), ExpandRotateKernelInfo(), fact(), FreiChenKernel, GaussianKernel, GetMagickModule, GetOptimalKernelWidth1D(), GetOptimalKernelWidth2D(), _KernelInfo::height, KernelRank, KirschKernel, LaplacianKernel, LastKernelInfo(), LineEndsKernel, LineJunctionsKernel, LoGKernel, Magick2PI, MagickAssumeAligned, MagickCoreSignature, MagickEpsilon, MagickMax, MagickPI, MagickSQ2, MagickSQ2PI, ManhattanKernel, _KernelInfo::maximum, _KernelInfo::minimum, _KernelInfo::negative_range, _KernelInfo::next, NormalizeValue, NoValue, OctagonalKernel, OctagonKernel, OptionWarning, ParseKernelArray(), PeaksKernel, PlusKernel, _KernelInfo::positive_range, PrewittKernel, _GeometryInfo::psi, RectangleKernel, _GeometryInfo::rho, RidgesKernel, RingKernel, RobertsKernel, RotateKernelInfo(), ScaleKernelInfo(), _GeometryInfo::sigma, _KernelInfo::signature, SkeletonKernel, SobelKernel, SquareKernel, ThinSEKernel, ThrowMagickException(), _KernelInfo::type, UndefinedKernel, UnityKernel, UserDefinedKernel, _KernelInfo::values, _KernelInfo::width, _KernelInfo::x, _GeometryInfo::xi, and _KernelInfo::y.
Referenced by ParseKernelName().
MagickExport KernelInfo * AcquireKernelInfo | ( | const char * | kernel_string, |
ExceptionInfo * | exception | ||
) |
Definition at line 485 of file morphology.c.
References DestroyKernelInfo(), DestroyString(), FileToString(), GetNextToken(), LastKernelInfo(), MagickPathExtent, _KernelInfo::next, ParseKernelArray(), and ParseKernelName().
Referenced by AcquireKernelBuiltIn(), BlendConvolveImage(), BlurImage(), CannyEdgeImage(), EdgeImage(), EmbossImage(), GaussianBlurImage(), GetStructuralSimilarityDistortion(), SaliencyBlendImage(), SeamlessBlendImage(), and SharpenImage().
|
static |
Definition at line 2481 of file morphology.c.
References _KernelInfo::height, MagickEpsilon, Maximize, _KernelInfo::maximum, Minimize, _KernelInfo::minimum, _KernelInfo::negative_range, _KernelInfo::positive_range, _KernelInfo::values, and _KernelInfo::width.
Referenced by AcquireKernelBuiltIn(), and UnityAddKernelInfo().
MagickExport KernelInfo * CloneKernelInfo | ( | const KernelInfo * | kernel | ) |
Definition at line 2213 of file morphology.c.
References AcquireAlignedMemory(), AcquireMagickMemory(), CloneKernelInfo(), DestroyKernelInfo(), _KernelInfo::height, MagickAssumeAligned, _KernelInfo::next, _KernelInfo::values, and _KernelInfo::width.
Referenced by CloneKernelInfo(), ExpandMirrorKernelInfo(), ExpandRotateKernelInfo(), MorphologyApply(), and MorphologyImage().
MagickExport KernelInfo * DestroyKernelInfo | ( | KernelInfo * | kernel | ) |
Definition at line 2268 of file morphology.c.
References DestroyKernelInfo(), _KernelInfo::next, RelinquishAlignedMemory(), RelinquishMagickMemory(), and _KernelInfo::values.
Referenced by AcquireKernelBuiltIn(), AcquireKernelInfo(), BlendConvolveImage(), BlurImage(), CannyEdgeImage(), CloneKernelInfo(), DestroyKernelInfo(), EdgeImage(), EmbossImage(), ExpandRotateKernelInfo(), GaussianBlurImage(), GetStructuralSimilarityDistortion(), MorphologyApply(), MorphologyImage(), ParseKernelArray(), SaliencyBlendImage(), SeamlessBlendImage(), and SharpenImage().
static void ExpandMirrorKernelInfo | ( | KernelInfo * | kernel | ) |
Definition at line 2328 of file morphology.c.
References CloneKernelInfo(), LastKernelInfo(), _KernelInfo::next, and RotateKernelInfo().
Referenced by AcquireKernelBuiltIn(), ParseKernelArray(), and ParseKernelName().
static void ExpandRotateKernelInfo | ( | KernelInfo * | kernel, |
const double | angle | ||
) |
Definition at line 2420 of file morphology.c.
References CloneKernelInfo(), DestroyKernelInfo(), DisableMSCWarning, LastKernelInfo(), MagickFalse, _KernelInfo::next, RestoreMSCWarning, RotateKernelInfo(), and SameKernelInfo().
Referenced by AcquireKernelBuiltIn(), ParseKernelArray(), and ParseKernelName().
|
inlinestatic |
Definition at line 96 of file morphology.c.
Referenced by AcquireKernelBuiltIn().
|
inlinestatic |
Definition at line 118 of file morphology.c.
References _KernelInfo::next.
Referenced by AcquireKernelBuiltIn(), AcquireKernelInfo(), ExpandMirrorKernelInfo(), and ExpandRotateKernelInfo().
MagickPrivate Image * MorphologyApply | ( | const Image * | image, |
const MorphologyMethod | method, | ||
const ssize_t | iterations, | ||
const KernelInfo * | kernel, | ||
const CompositeOperator | compose, | ||
const double | bias, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 3642 of file morphology.c.
References BottomHatMorphology, CloneImage(), CloneKernelInfo(), CloseIntensityMorphology, CloseMorphology, _Image::columns, CommandOptionToMnemonic(), _Image::compose, CompositeImage(), ConvolveMorphology, CopyAlphaCompositeOp, CorrelateMorphology, DeactivateAlphaChannel, DestroyImage(), DestroyKernelInfo(), DifferenceCompositeOp, DilateIntensityMorphology, DilateMorphology, DirectClass, DistanceMorphology, EdgeInMorphology, EdgeMorphology, EdgeOutMorphology, ErodeIntensityMorphology, ErodeMorphology, FormatLocaleFile(), FormatLocaleString(), GetImageArtifact(), HitAndMissMorphology, IsStringTrue(), LightenCompositeOp, MagickComposeOptions, MagickCoreSignature, MagickFalse, MagickMorphologyOptions, MagickPathExtent, MagickTrue, MorphologyPrimitive(), MorphologyPrimitiveDirect(), _KernelInfo::next, NoCompositeOp, OpenIntensityMorphology, OpenMorphology, RotateKernelInfo(), _Image::rows, SetImageAlphaChannel(), SetImageStorageClass(), _ExceptionInfo::signature, _Image::signature, _KernelInfo::signature, SmoothMorphology, ThickenMorphology, ThinningMorphology, TopHatMorphology, UndefinedCompositeOp, and VoronoiMorphology.
Referenced by MorphologyImage().
MagickExport Image * MorphologyImage | ( | const Image * | image, |
const MorphologyMethod | method, | ||
const ssize_t | iterations, | ||
const KernelInfo * | kernel, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 4137 of file morphology.c.
References CloneKernelInfo(), ConvolveMorphology, CorrelateMorphology, DestroyKernelInfo(), _Image::filename, GetImageArtifact(), GetMagickModule, IsEventLogging(), IsGeometry(), IsStringTrue(), LogMagickEvent(), MagickComposeOptions, MagickCoreSignature, MagickFalse, MorphologyApply(), OptionWarning, ParseCommandOption(), QuantumRange, ScaleGeometryKernelInfo(), ShowKernelInfo(), _ExceptionInfo::signature, _Image::signature, StringToDoubleInterval(), ThrowMagickException(), TraceEvent, and UndefinedCompositeOp.
Referenced by CannyEdgeImage(), and ConvolveImage().
|
static |
Definition at line 2562 of file morphology.c.
References AcquireAuthenticCacheView(), AcquireQuantumMemory(), AcquireVirtualCacheView(), _Image::alpha_trait, BlendPixelTrait, ClampToQuantum(), _Image::columns, ConvolveMorphology, CopyPixelTrait, DestroyCacheView(), DilateIntensityMorphology, DilateMorphology, ErodeIntensityMorphology, ErodeMorphology, GetCacheViewAuthenticPixels(), GetCacheViewVirtualPixels(), GetMagickModule, GetOpenMPMaximumThreads(), GetOpenMPThreadId(), GetPixelAlpha(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelIntensity(), _KernelInfo::height, HitAndMissMorphology, IsNaN, IterativeDistanceMorphology, magick_restrict, MagickCoreSignature, MagickEpsilon, MagickFalse, MagickTrue, MorphologyTag, OptionWarning, PerceptibleReciprocal(), _Image::progress_monitor, QuantumRange, QuantumScale, RelinquishMagickMemory(), ResourceLimitFatalError, _Image::rows, SetImageProgress(), SetPixelChannel(), _ExceptionInfo::signature, _Image::signature, _KernelInfo::signature, SyncCacheViewAuthenticPixels(), ThickenMorphology, ThinningMorphology, ThrowFatalException, ThrowMagickException(), _Image::type, UndefinedMorphology, UndefinedPixelTrait, _KernelInfo::values, _KernelInfo::width, _OffsetInfo::x, _KernelInfo::x, _OffsetInfo::y, and _KernelInfo::y.
Referenced by MorphologyApply().
|
static |
Definition at line 3250 of file morphology.c.
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), ClampToQuantum(), _Image::columns, CopyPixelTrait, DestroyCacheView(), DistanceMorphology, GetCacheViewAuthenticPixels(), GetCacheViewVirtualPixels(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), _KernelInfo::height, IsNaN, magick_restrict, MagickCoreSignature, MagickEpsilon, MagickFalse, MagickTrue, MorphologyTag, _Image::progress_monitor, QuantumRange, _Image::rows, SetImageProgress(), _ExceptionInfo::signature, _Image::signature, _KernelInfo::signature, SyncCacheViewAuthenticPixels(), UndefinedPixelTrait, _KernelInfo::values, VoronoiMorphology, _KernelInfo::width, _OffsetInfo::x, _KernelInfo::x, _OffsetInfo::y, and _KernelInfo::y.
Referenced by MorphologyApply().
|
static |
Definition at line 213 of file morphology.c.
References AcquireAlignedMemory(), AcquireMagickMemory(), _KernelInfo::angle, AreaValue, DestroyKernelInfo(), ExpandMirrorKernelInfo(), ExpandRotateKernelInfo(), GetNextToken(), GreaterValue, _KernelInfo::height, LessValue, LocaleCompare(), MagickAssumeAligned, MagickCoreSignature, MagickMaximumValue, MagickPathExtent, Maximize, _KernelInfo::maximum, Minimize, _KernelInfo::minimum, _KernelInfo::negative_range, _KernelInfo::next, NoValue, ParseGeometry(), _KernelInfo::positive_range, _GeometryInfo::psi, _GeometryInfo::rho, SetGeometryInfo(), _GeometryInfo::sigma, _KernelInfo::signature, StringToDouble(), _KernelInfo::type, UserDefinedKernel, _KernelInfo::values, _KernelInfo::width, WidthValue, _KernelInfo::x, _GeometryInfo::xi, XValue, _KernelInfo::y, and YValue.
Referenced by AcquireKernelBuiltIn(), and AcquireKernelInfo().
|
static |
Definition at line 372 of file morphology.c.
References AcquireKernelBuiltIn(), AreaValue, AspectValue, ChebyshevKernel, CrossKernel, DiamondKernel, DiskKernel, EuclideanKernel, ExpandMirrorKernelInfo(), ExpandRotateKernelInfo(), FormatLocaleFile(), GetNextToken(), GreaterValue, HeightValue, LessValue, MagickFalse, MagickKernelOptions, MagickPathExtent, ManhattanKernel, _KernelInfo::next, OctagonalKernel, OctagonKernel, ParseCommandOption(), ParseGeometry(), PercentValue, PlusKernel, _GeometryInfo::psi, QuantumRange, RectangleKernel, _GeometryInfo::rho, RingKernel, SetGeometryInfo(), _GeometryInfo::sigma, SquareKernel, UnityKernel, UserDefinedKernel, WidthValue, _GeometryInfo::xi, XValue, and YValue.
Referenced by AcquireKernelInfo().
static void RotateKernelInfo | ( | KernelInfo * | kernel, |
double | angle | ||
) |
Definition at line 4266 of file morphology.c.
References _KernelInfo::angle, BlurKernel, ChebyshevKernel, CrossKernel, DiamondKernel, DiskKernel, DoGKernel, EuclideanKernel, GaussianKernel, _KernelInfo::height, LaplacianKernel, LoGKernel, ManhattanKernel, _KernelInfo::next, PeaksKernel, PlusKernel, RotateKernelInfo(), SquareKernel, _KernelInfo::type, _KernelInfo::values, _KernelInfo::width, _KernelInfo::x, and _KernelInfo::y.
Referenced by AcquireKernelBuiltIn(), ExpandMirrorKernelInfo(), ExpandRotateKernelInfo(), MorphologyApply(), and RotateKernelInfo().
|
static |
Definition at line 2392 of file morphology.c.
References _KernelInfo::height, IsNaN, MagickEpsilon, MagickFalse, MagickTrue, _KernelInfo::values, _KernelInfo::width, _KernelInfo::x, and _KernelInfo::y.
Referenced by ExpandRotateKernelInfo().
MagickExport void ScaleGeometryKernelInfo | ( | KernelInfo * | kernel, |
const char * | geometry | ||
) |
Definition at line 4473 of file morphology.c.
References FormatLocaleFile(), ParseGeometry(), PercentValue, _GeometryInfo::psi, _GeometryInfo::rho, RhoValue, ScaleKernelInfo(), SetGeometryInfo(), _GeometryInfo::sigma, SigmaValue, UnityAddKernelInfo(), and _GeometryInfo::xi.
Referenced by MorphologyImage().
MagickExport void ScaleKernelInfo | ( | KernelInfo * | kernel, |
const double | scaling_factor, | ||
const GeometryFlags | normalize_flags | ||
) |
Definition at line 4579 of file morphology.c.
References CorrelateNormalizeValue, _KernelInfo::height, IsNaN, MagickEpsilon, _KernelInfo::maximum, _KernelInfo::minimum, _KernelInfo::negative_range, _KernelInfo::next, NormalizeValue, _KernelInfo::positive_range, ScaleKernelInfo(), _KernelInfo::values, and _KernelInfo::width.
Referenced by AcquireKernelBuiltIn(), ScaleGeometryKernelInfo(), and ScaleKernelInfo().
MagickPrivate void ShowKernelInfo | ( | const KernelInfo * | kernel | ) |
Definition at line 4666 of file morphology.c.
References _KernelInfo::angle, CommandOptionToMnemonic(), FormatLocaleFile(), GetMagickPrecision(), _KernelInfo::height, IsNaN, MagickEpsilon, MagickKernelOptions, _KernelInfo::maximum, _KernelInfo::minimum, _KernelInfo::negative_range, _KernelInfo::next, _KernelInfo::positive_range, _KernelInfo::type, _KernelInfo::values, _KernelInfo::width, _KernelInfo::x, and _KernelInfo::y.
Referenced by MorphologyImage().
MagickExport void UnityAddKernelInfo | ( | KernelInfo * | kernel, |
const double | scale | ||
) |
Definition at line 4745 of file morphology.c.
References CalcKernelMetaData(), _KernelInfo::next, UnityAddKernelInfo(), _KernelInfo::values, _KernelInfo::width, _KernelInfo::x, and _KernelInfo::y.
Referenced by ScaleGeometryKernelInfo(), and UnityAddKernelInfo().
MagickPrivate void ZeroKernelNans | ( | KernelInfo * | kernel | ) |
Definition at line 4784 of file morphology.c.
References _KernelInfo::height, IsNaN, _KernelInfo::next, _KernelInfo::values, _KernelInfo::width, and ZeroKernelNans().
Referenced by ZeroKernelNans().