MagickCore
6.9.11-59
Convert, Edit, Or Compose Bitmap Images
|
Go to the documentation of this file.
18 #ifndef MAGICKCORE_THRESHOLD_H
19 #define MAGICKCORE_THRESHOLD_H
21 #if defined(__cplusplus) || defined(c_plusplus)
68 #if defined(__cplusplus) || defined(c_plusplus)
ColorspaceType colorspace
Definition: image.h:158
char * map_id
Definition: threshold.c:100
MagickExport MagickBooleanType PerceptibleImage(Image *, const double)
#define QuantumScale
Definition: magick-type.h:124
MagickExport MagickBooleanType RandomThresholdImage(Image *, const char *, ExceptionInfo *)
#define MagickMinimumValue
Definition: magick-type.h:121
#define MagickExport
Definition: method-attribute.h:80
MagickBooleanType debug
Definition: image.h:290
char filename[MaxTextExtent]
Definition: image.h:278
static double KapurThreshold(const Image *image, const double *histogram, ExceptionInfo *exception)
Definition: threshold.c:398
MagickProgressMonitor progress_monitor
Definition: image.h:264
MagickExport MagickBooleanType PerceptibleImageChannel(Image *image, const ChannelType channel, const double epsilon)
Definition: threshold.c:2129
MagickExport Image * CloneImage(const Image *image, const size_t columns, const size_t rows, const MagickBooleanType detach, ExceptionInfo *exception)
Definition: image.c:771
#define TransparentOpacity
Definition: image.h:28
MagickBooleanType matte
Definition: image.h:171
MagickExport MagickBooleanType SetImageProgress(const Image *image, const char *tag, const MagickOffsetType offset, const MagickSizeType extent)
Definition: monitor.c:136
#define OpaqueOpacity
Definition: image.h:27
@ PsiValue
Definition: geometry.h:34
static RandomInfo ** AcquireRandomInfoThreadSet(void)
Definition: random-private.h:40
MagickExport const char * GetStringInfoPath(const StringInfo *string_info)
Definition: string.c:1270
@ SyncChannels
Definition: magick-type.h:191
MagickRealType red
Definition: pixel.h:122
@ DirectClass
Definition: magick-type.h:198
@ BlueChannel
Definition: magick-type.h:176
#define magick_unreferenced(x)
Definition: method-attribute.h:106
#define GetMagickModule()
Definition: log.h:29
MagickExport CacheView * DestroyCacheView(CacheView *cache_view)
Definition: cache-view.c:256
MagickExport void GetMagickPixelPacket(const Image *image, MagickPixelPacket *pixel)
Definition: pixel.c:2233
unsigned int MagickStatusType
Definition: magick-type.h:131
@ RedChannel
Definition: magick-type.h:171
double psi
Definition: geometry.h:112
#define SetPixelOpacity(pixel, value)
Definition: pixel-accessor.h:81
ChannelType
Definition: magick-type.h:169
@ XiValue
Definition: geometry.h:31
MagickExport MagickBooleanType WhiteThresholdImageChannel(Image *image, const ChannelType channel, const char *thresholds, ExceptionInfo *exception)
Definition: threshold.c:2620
#define MagickCoreSignature
Definition: method-attribute.h:86
@ TriangleThresholdMethod
Definition: threshold.h:30
MagickExport MagickBooleanType BilevelImage(Image *image, const double threshold)
Definition: threshold.c:818
MagickExport ssize_t FormatLocaleString(char *magick_restrict string, const size_t length, const char *magick_restrict format,...)
Definition: locale.c:497
MagickExport MagickBooleanType BlackThresholdImage(Image *image, const char *threshold)
Definition: threshold.c:977
MagickExport const IndexPacket * GetCacheViewVirtualIndexQueue(const CacheView *cache_view)
Definition: cache-view.c:638
size_t height
Definition: threshold.c:105
ssize_t * levels
Definition: threshold.c:109
@ IndexChannel
Definition: magick-type.h:182
MagickExport PixelPacket * GetCacheViewAuthenticPixels(CacheView *cache_view, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
Definition: cache-view.c:473
double sigma
Definition: geometry.h:110
#define magick_restrict
Definition: MagickCore.h:41
MagickExport MagickBooleanType WhiteThresholdImageChannel(Image *, const ChannelType, const char *, ExceptionInfo *)
Definition: threshold.c:2620
#define SetPixelRed(pixel, value)
Definition: pixel-accessor.h:82
MagickExport MagickBooleanType BlackThresholdImage(Image *, const char *)
#define SetPixelRGBO(pixel, packet)
Definition: pixel-accessor.h:96
MagickExport const char * GetXMLTreeAttribute(XMLTreeInfo *xml_info, const char *tag)
Definition: xml-tree.c:777
MagickExport MagickBooleanType OrderedDitherImage(Image *image)
Definition: threshold.c:1750
size_t columns
Definition: image.h:174
MagickExport MagickBooleanType AcquireImageColormap(Image *image, const size_t colors)
Definition: colormap.c:103
#define SetPixelGreen(pixel, value)
Definition: pixel-accessor.h:77
Definition: geometry.h:107
Quantum IndexPacket
Definition: pixel.h:129
MagickBooleanType ListThresholdMapFile(FILE *file, const char *xml, const char *filename, ExceptionInfo *exception)
Definition: threshold.c:1608
@ sRGBColorspace
Definition: colorspace.h:40
double xi
Definition: geometry.h:111
#define GetPixelRed(pixel)
Definition: pixel-accessor.h:50
@ ResourceLimitError
Definition: exception.h:55
MagickExport MagickBooleanType BilevelImage(Image *, const double)
MagickExport MagickBooleanType OrderedDitherImageChannel(Image *image, const ChannelType channel, ExceptionInfo *exception)
Definition: threshold.c:1759
Definition: cache-view.c:66
MagickExport MagickBooleanType SetImageProperty(Image *image, const char *property, const char *value)
Definition: property.c:4171
MagickExport char * DestroyString(char *string)
Definition: string.c:808
@ ChiValue
Definition: geometry.h:41
MagickExport MagickBooleanType SyncImage(Image *image)
Definition: image.c:3676
@ MagickTrue
Definition: magick-type.h:205
MagickExport const char * GetXMLTreeContent(XMLTreeInfo *xml_info)
Definition: xml-tree.c:934
static double TriangleThreshold(const Image *image, const double *histogram)
Definition: threshold.c:576
MagickExport MagickBooleanType ListThresholdMaps(FILE *, ExceptionInfo *)
#define GetPixelAlpha(pixel)
Definition: pixel-accessor.h:36
MagickRealType index
Definition: pixel.h:126
#define GetPixelIndex(indexes)
Definition: pixel-accessor.h:44
MagickExport MagickBooleanType SyncCacheViewAuthenticPixels(CacheView *magick_restrict cache_view, ExceptionInfo *exception)
Definition: cache-view.c:1000
MagickRealType blue
Definition: pixel.h:124
MagickExport MagickBooleanType BlackThresholdImageChannel(Image *image, const ChannelType channel, const char *thresholds, ExceptionInfo *exception)
Definition: threshold.c:988
static Quantum ClampToQuantum(const MagickRealType quantum)
Definition: quantum.h:88
#define ThresholdImageTag
MagickExport ThresholdMap * DestroyThresholdMap(ThresholdMap *)
@ TraceEvent
Definition: log.h:38
MagickExport void * AcquireMagickMemory(const size_t size)
Definition: memory.c:552
PixelPacket * colormap
Definition: image.h:180
Definition: xml-tree.c:77
MagickExport MagickBooleanType RandomThresholdImageChannel(Image *image, const ChannelType channel, const char *thresholds, ExceptionInfo *exception)
Definition: threshold.c:2288
double rho
Definition: geometry.h:109
MagickExport ssize_t FormatLocaleFile(FILE *file, const char *magick_restrict format,...)
Definition: locale.c:402
static RandomInfo ** DestroyRandomInfoThreadSet(RandomInfo **random_info)
Definition: random-private.h:27
@ KapurThresholdMethod
Definition: threshold.h:28
static Quantum ClampPixel(const MagickRealType value)
Definition: pixel-accessor.h:111
MagickExport MagickBooleanType ClampImage(Image *)
#define SetPixelAlpha(pixel, value)
Definition: pixel-accessor.h:67
unsigned int blue
Definition: pixel.h:99
MagickExport IndexPacket * GetCacheViewAuthenticIndexQueue(CacheView *cache_view)
Definition: cache-view.c:564
MagickExport MagickBooleanType BilevelImageChannel(Image *, const ChannelType, const double)
MagickExport MagickBooleanType ClampImage(Image *image)
Definition: threshold.c:1147
MagickExport CacheView * AcquireAuthenticCacheView(const Image *image, ExceptionInfo *exception)
Definition: cache-view.c:111
MagickExport unsigned long GetRandomSecretKey(const RandomInfo *random_info)
Definition: random.c:713
double chi
Definition: geometry.h:113
MagickExport MagickBooleanType AutoThresholdImage(Image *image, const AutoThresholdMethod method, ExceptionInfo *exception)
Definition: threshold.c:667
MagickExport MagickBooleanType OrderedPosterizeImageChannel(Image *image, const ChannelType channel, const char *threshold_map, ExceptionInfo *exception)
Definition: threshold.c:1835
@ ConfigureEvent
Definition: log.h:43
static MagickBooleanType IsMagickGray(const MagickPixelPacket *pixel)
Definition: color-private.h:91
MagickExport int LocaleCompare(const char *p, const char *q)
Definition: locale.c:1435
unsigned int index
Definition: pixel.h:101
@ OpacityChannel
Definition: magick-type.h:179
size_t colors
Definition: image.h:177
MagickExport MagickBooleanType ListThresholdMaps(FILE *file, ExceptionInfo *exception)
Definition: threshold.c:1686
MagickExport Image * AdaptiveThresholdImage(const Image *image, const size_t width, const size_t height, const ssize_t offset, ExceptionInfo *exception)
Definition: threshold.c:169
ExceptionInfo exception
Definition: image.h:287
@ OptionError
Definition: exception.h:57
@ OTSUThresholdMethod
Definition: threshold.h:29
#define SetPixelBlue(pixel, value)
Definition: pixel-accessor.h:71
@ MagickFalse
Definition: magick-type.h:204
MagickBooleanType(* MagickProgressMonitor)(const char *, const MagickOffsetType, const MagickSizeType, void *)
Definition: monitor.h:26
MagickExport XMLTreeInfo * NewXMLTree(const char *xml, ExceptionInfo *exception)
Definition: xml-tree.c:1956
#define GetPixelBlue(pixel)
Definition: pixel-accessor.h:38
#define ThresholdsFilename
Definition: threshold.c:92
static double OTSUThreshold(const Image *image, const double *histogram, ExceptionInfo *exception)
Definition: threshold.c:497
ssize_t divisor
Definition: threshold.c:108
static Quantum PerceptibleThreshold(const Quantum quantum, const double epsilon)
Definition: threshold.c:2107
#define GetPixelOpacity(pixel)
Definition: pixel-accessor.h:49
@ UndefinedThresholdMethod
Definition: threshold.h:27
MagickExport MagickBooleanType AutoThresholdImage(Image *, const AutoThresholdMethod, ExceptionInfo *)
@ DefaultChannels
Definition: magick-type.h:192
MagickExport double GetPseudoRandomValue(RandomInfo *magick_restrict random_info)
Definition: random.c:582
MagickExport XMLTreeInfo * DestroyXMLTree(XMLTreeInfo *xml_info)
Definition: xml-tree.c:556
MagickExport MagickStatusType ParseGeometry(const char *geometry, GeometryInfo *geometry_info)
Definition: geometry.c:868
MagickExport ThresholdMap * GetThresholdMap(const char *map_id, ExceptionInfo *exception)
Definition: threshold.c:1549
MagickExport XMLTreeInfo * GetNextXMLTreeTag(XMLTreeInfo *xml_info)
Definition: xml-tree.c:742
static double PerceptibleReciprocal(const double x)
Definition: pixel-accessor.h:124
#define QuantumRange
Definition: magick-type.h:90
@ CMYKColorspace
Definition: colorspace.h:39
MagickExport MagickBooleanType PerceptibleImage(Image *image, const double epsilon)
Definition: threshold.c:2119
MagickExport MagickBooleanType RandomThresholdImage(Image *image, const char *thresholds, ExceptionInfo *exception)
Definition: threshold.c:2277
size_t rows
Definition: image.h:175
MagickExport MagickBooleanType RandomThresholdImageChannel(Image *, const ChannelType, const char *, ExceptionInfo *)
size_t signature
Definition: exception.h:124
MagickExport ThresholdMap * GetThresholdMap(const char *, ExceptionInfo *)
Definition: threshold.c:1549
MagickExport char * ConstantString(const char *source)
Definition: string.c:698
size_t signature
Definition: image.h:307
MagickBooleanType
Definition: magick-type.h:203
static const char * MinimalThresholdMap
Definition: threshold.c:116
@ PercentValue
Definition: geometry.h:49
MagickExport void * GetNextValueInLinkedList(LinkedListInfo *list_info)
Definition: hashmap.c:606
MagickExport void * RelinquishMagickMemory(void *memory)
Definition: memory.c:1162
static RandomInfo * random_info
Definition: resource.c:112
unsigned int red
Definition: pixel.h:97
Definition: exception.h:103
#define SetPixelIndex(indexes, value)
Definition: pixel-accessor.h:78
ClassType storage_class
Definition: image.h:155
MagickExport MagickBooleanType OrderedDitherImageChannel(Image *, const ChannelType, ExceptionInfo *)
static long StringToLong(const char *magick_restrict value)
Definition: string-private.h:108
MagickDoubleType MagickRealType
Definition: magick-type.h:129
MagickExport const char * GetImageArtifact(const Image *image, const char *artifact)
Definition: artifact.c:266
MagickExport MagickBooleanType BlackThresholdImageChannel(Image *, const ChannelType, const char *, ExceptionInfo *)
@ CompositeChannels
Definition: magick-type.h:183
MagickExport Image * AdaptiveThresholdImage(const Image *, const size_t, const size_t, const ssize_t, ExceptionInfo *)
Definition: threshold.c:169
MagickExport CacheView * AcquireVirtualCacheView(const Image *image, ExceptionInfo *exception)
Definition: cache-view.c:153
@ PseudoClass
Definition: magick-type.h:199
MagickExport Image * DestroyImage(Image *image)
Definition: image.c:1174
MagickExport MagickBooleanType PerceptibleImageChannel(Image *, const ChannelType, const double)
MagickExport ThresholdMap * GetThresholdMapFile(const char *xml, const char *filename, const char *map_id, ExceptionInfo *exception)
Definition: threshold.c:1331
MagickExport MagickBooleanType OrderedPosterizeImage(Image *image, const char *threshold_map, ExceptionInfo *exception)
Definition: threshold.c:1824
MagickExport MagickBooleanType ClampImageChannel(Image *, const ChannelType)
@ SigmaValue
Definition: geometry.h:40
MagickExport unsigned char * GetStringInfoDatum(const StringInfo *string_info)
Definition: string.c:1183
AutoThresholdMethod
Definition: threshold.h:26
MagickExport int GetMagickPrecision(void)
Definition: magick.c:690
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
Definition: exception.c:1149
#define ThrowFatalException(severity, tag)
Definition: exception-private.h:42
MagickExport MagickBooleanType IsStringTrue(const char *value)
Definition: string.c:1393
MagickExport MagickBooleanType WhiteThresholdImage(Image *, const char *)
MagickExport MagickRealType GetPixelIntensity(const Image *image, const PixelPacket *magick_restrict pixel)
Definition: pixel.c:2292
MagickExport MagickBooleanType OrderedPosterizeImageChannel(Image *, const ChannelType, const char *, ExceptionInfo *)
MagickExport MagickBooleanType OrderedDitherImage(Image *)
MagickExport MagickBooleanType ClampImageChannel(Image *image, const ChannelType channel)
Definition: threshold.c:1156
MagickExport MagickBooleanType SetImageStorageClass(Image *image, const ClassType storage_class)
Definition: image.c:2595
#define GetPixelGreen(pixel)
Definition: pixel-accessor.h:43
MagickExport ThresholdMap * DestroyThresholdMap(ThresholdMap *map)
Definition: threshold.c:1288
MagickExport MagickBooleanType LogMagickEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
Definition: log.c:1420
MagickExport MagickBooleanType BilevelImageChannel(Image *image, const ChannelType channel, const double threshold)
Definition: threshold.c:827
#define MaxTextExtent
Definition: method-attribute.h:89
unsigned int green
Definition: pixel.h:98
MagickExport const PixelPacket * GetCacheViewVirtualPixels(const CacheView *cache_view, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
Definition: cache-view.c:723
unsigned int opacity
Definition: pixel.h:100
MagickExport XMLTreeInfo * GetXMLTreeChild(XMLTreeInfo *xml_info, const char *tag)
Definition: xml-tree.c:894
MagickExport void InheritException(ExceptionInfo *exception, const ExceptionInfo *relative)
Definition: exception.c:692
char * description
Definition: threshold.c:101
@ ResourceLimitFatalError
Definition: exception.h:78
MagickExport MagickBooleanType OrderedPosterizeImage(Image *, const char *, ExceptionInfo *)
MagickExport MagickBooleanType WhiteThresholdImage(Image *image, const char *threshold)
Definition: threshold.c:2609
MagickRealType opacity
Definition: pixel.h:125
MagickRealType green
Definition: pixel.h:123
Definition: threshold.c:98
@ GreenChannel
Definition: magick-type.h:174
size_t width
Definition: threshold.c:104
#define ThrowBinaryException(severity, tag, context)
Definition: exception-private.h:29
#define PerceptibleImageTag
static MagickBooleanType IsGrayColorspace(const ColorspaceType colorspace)
Definition: colorspace-private.h:96
MagickExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
Definition: memory.c:665
unsigned short Quantum
Definition: magick-type.h:89
ssize_t MagickOffsetType
Definition: magick-type.h:139
static unsigned long StringToUnsignedLong(const char *magick_restrict value)
Definition: string-private.h:124
static int GetOpenMPThreadId(void)
Definition: thread-private.h:120
#define MagickPathExtent
Definition: magick-type.h:31
MagickExport MagickBooleanType SetImageColorspace(Image *image, const ColorspaceType colorspace)
Definition: colorspace.c:1250