threshold.c File Reference

#include "MagickCore/studio.h"
#include "MagickCore/property.h"
#include "MagickCore/blob.h"
#include "MagickCore/cache-view.h"
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
#include "MagickCore/colorspace-private.h"
#include "MagickCore/configure.h"
#include "MagickCore/constitute.h"
#include "MagickCore/decorate.h"
#include "MagickCore/draw.h"
#include "MagickCore/enhance.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/effect.h"
#include "MagickCore/fx.h"
#include "MagickCore/gem.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/montage.h"
#include "MagickCore/option.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/pixel-private.h"
#include "MagickCore/quantize.h"
#include "MagickCore/quantum.h"
#include "MagickCore/quantum-private.h"
#include "MagickCore/random_.h"
#include "MagickCore/random-private.h"
#include "MagickCore/resize.h"
#include "MagickCore/resource_.h"
#include "MagickCore/segment.h"
#include "MagickCore/shear.h"
#include "MagickCore/signature-private.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/threshold.h"
#include "MagickCore/token.h"
#include "MagickCore/transform.h"
#include "MagickCore/xml-tree.h"
#include "MagickCore/xml-tree-private.h"

Data Structures

struct  _ThresholdMap

Defines

#define ThresholdsFilename   "thresholds.xml"
#define AdaptiveThresholdImageTag   "AdaptiveThreshold/Image"
#define MaxIntensity   255
#define ThresholdImageTag   "Threshold/Image"
#define ThresholdImageTag   "Threshold/Image"
#define ClampImageTag   "Clamp/Image"
#define DitherImageTag   "Dither/Image"
#define PerceptibleImageTag   "Perceptible/Image"
#define ThresholdImageTag   "Threshold/Image"
#define ThresholdImageTag   "Threshold/Image"
#define ThresholdImageTag   "Threshold/Image"

Functions

static ThresholdMapGetThresholdMapFile (const char *, const char *, const char *, ExceptionInfo *)
MagickExport ImageAdaptiveThresholdImage (const Image *image, const size_t width, const size_t height, const double bias, ExceptionInfo *exception)
static double KapurThreshold (const Image *image, const double *histogram, ExceptionInfo *exception)
static double OTSUThreshold (const Image *image, const double *histogram, ExceptionInfo *exception)
static double TriangleThreshold (const double *histogram)
MagickExport MagickBooleanType AutoThresholdImage (Image *image, const AutoThresholdMethod method, ExceptionInfo *exception)
MagickExport MagickBooleanType BilevelImage (Image *image, const double threshold, ExceptionInfo *exception)
MagickExport MagickBooleanType BlackThresholdImage (Image *image, const char *thresholds, ExceptionInfo *exception)
MagickExport MagickBooleanType ClampImage (Image *image, ExceptionInfo *exception)
MagickExport ThresholdMapDestroyThresholdMap (ThresholdMap *map)
MagickExport ThresholdMapGetThresholdMap (const char *map_id, ExceptionInfo *exception)
MagickBooleanType ListThresholdMapFile (FILE *file, const char *xml, const char *filename, ExceptionInfo *exception)
MagickExport MagickBooleanType ListThresholdMaps (FILE *file, ExceptionInfo *exception)
MagickExport MagickBooleanType OrderedDitherImage (Image *image, const char *threshold_map, ExceptionInfo *exception)
static Quantum PerceptibleThreshold (const Quantum quantum, const double epsilon)
MagickExport MagickBooleanType PerceptibleImage (Image *image, const double epsilon, ExceptionInfo *exception)
MagickExport MagickBooleanType RandomThresholdImage (Image *image, const double min_threshold, const double max_threshold, ExceptionInfo *exception)
MagickExport MagickBooleanType RangeThresholdImage (Image *image, const double low_black, const double low_white, const double high_white, const double high_black, ExceptionInfo *exception)
MagickExport MagickBooleanType WhiteThresholdImage (Image *image, const char *thresholds, ExceptionInfo *exception)

Variables

static const char *const BuiltinMap

Define Documentation

#define AdaptiveThresholdImageTag   "AdaptiveThreshold/Image"

Referenced by AdaptiveThresholdImage().

#define ClampImageTag   "Clamp/Image"

Referenced by ClampImage().

#define DitherImageTag   "Dither/Image"
#define MaxIntensity   255
#define PerceptibleImageTag   "Perceptible/Image"

Referenced by PerceptibleImage().

#define ThresholdImageTag   "Threshold/Image"
#define ThresholdImageTag   "Threshold/Image"
#define ThresholdImageTag   "Threshold/Image"
#define ThresholdImageTag   "Threshold/Image"
#define ThresholdImageTag   "Threshold/Image"
#define ThresholdsFilename   "thresholds.xml"

Function Documentation

MagickExport Image* AdaptiveThresholdImage ( const Image image,
const size_t  width,
const size_t  height,
const double  bias,
ExceptionInfo exception 
)
MagickExport MagickBooleanType AutoThresholdImage ( Image image,
const AutoThresholdMethod  method,
ExceptionInfo exception 
)
MagickExport MagickBooleanType BilevelImage ( Image image,
const double  threshold,
ExceptionInfo exception 
)
MagickExport MagickBooleanType BlackThresholdImage ( Image image,
const char *  thresholds,
ExceptionInfo exception 
)
MagickExport MagickBooleanType ClampImage ( Image image,
ExceptionInfo exception 
)
MagickExport ThresholdMap* DestroyThresholdMap ( ThresholdMap map  ) 
MagickExport ThresholdMap* GetThresholdMap ( const char *  map_id,
ExceptionInfo exception 
)
static ThresholdMap * GetThresholdMapFile ( const char *  xml,
const char *  filename,
const char *  map_id,
ExceptionInfo exception 
) [static]
static double KapurThreshold ( const Image image,
const double *  histogram,
ExceptionInfo exception 
) [static]
MagickBooleanType ListThresholdMapFile ( FILE *  file,
const char *  xml,
const char *  filename,
ExceptionInfo exception 
)
MagickExport MagickBooleanType ListThresholdMaps ( FILE *  file,
ExceptionInfo exception 
)
MagickExport MagickBooleanType OrderedDitherImage ( Image image,
const char *  threshold_map,
ExceptionInfo exception 
)
static double OTSUThreshold ( const Image image,
const double *  histogram,
ExceptionInfo exception 
) [static]
MagickExport MagickBooleanType PerceptibleImage ( Image image,
const double  epsilon,
ExceptionInfo exception 
)
static Quantum PerceptibleThreshold ( const Quantum  quantum,
const double  epsilon 
) [inline, static]

Referenced by PerceptibleImage().

MagickExport MagickBooleanType RandomThresholdImage ( Image image,
const double  min_threshold,
const double  max_threshold,
ExceptionInfo exception 
)
MagickExport MagickBooleanType RangeThresholdImage ( Image image,
const double  low_black,
const double  low_white,
const double  high_white,
const double  high_black,
ExceptionInfo exception 
)
static double TriangleThreshold ( const double *  histogram  )  [static]

References MaxIntensity.

Referenced by AutoThresholdImage().

MagickExport MagickBooleanType WhiteThresholdImage ( Image image,
const char *  thresholds,
ExceptionInfo exception 
)

Variable Documentation

const char* const BuiltinMap [static]
Initial value:
    "<?xml version=\"1.0\"?>"
    "<thresholds>"
    "  <threshold map=\"threshold\" alias=\"1x1\">"
    "    <description>Threshold 1x1 (non-dither)</description>"
    "    <levels width=\"1\" height=\"1\" divisor=\"2\">"
    "        1"
    "    </levels>"
    "  </threshold>"
    "  <threshold map=\"checks\" alias=\"2x1\">"
    "    <description>Checkerboard 2x1 (dither)</description>"
    "    <levels width=\"2\" height=\"2\" divisor=\"3\">"
    "       1 2"
    "       2 1"
    "    </levels>"
    "  </threshold>"
    "</thresholds>"

Referenced by GetThresholdMap().


Generated on 10 Feb 2020 for MagickCore by  doxygen 1.6.1