MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
feature.c File Reference
#include "MagickCore/studio.h"
#include "MagickCore/animate.h"
#include "MagickCore/artifact.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/channel.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/feature.h"
#include "MagickCore/gem.h"
#include "MagickCore/geometry.h"
#include "MagickCore/list.h"
#include "MagickCore/image-private.h"
#include "MagickCore/magic.h"
#include "MagickCore/magick.h"
#include "MagickCore/matrix.h"
#include "MagickCore/memory_.h"
#include "MagickCore/module.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/morphology-private.h"
#include "MagickCore/option.h"
#include "MagickCore/paint.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/profile.h"
#include "MagickCore/property.h"
#include "MagickCore/quantize.h"
#include "MagickCore/quantum-private.h"
#include "MagickCore/random_.h"
#include "MagickCore/resource_.h"
#include "MagickCore/segment.h"
#include "MagickCore/semaphore.h"
#include "MagickCore/signature-private.h"
#include "MagickCore/string_.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/timer.h"
#include "MagickCore/utility.h"
#include "MagickCore/version.h"
Include dependency graph for feature.c:

Go to the source code of this file.

Data Structures

struct  _CannyInfo
 

Macros

#define CannyEdgeImageTag   "CannyEdge/Image"
 
#define Log10Epsilon   (1.0e-11)
 
#define BoundingBox   "viewbox"
 
#define HoughLineImageTag   "HoughLine/Image"
 
#define MaxMeanShiftIterations   100
 
#define MeanShiftImageTag   "MeanShift/Image"
 

Typedefs

typedef struct _CannyInfo CannyInfo
 

Functions

static MagickBooleanType IsAuthenticPixel (const Image *image, const ssize_t x, const ssize_t y)
 
static MagickBooleanType TraceEdges (Image *edge_image, CacheView *edge_view, MatrixInfo *canny_cache, const ssize_t x, const ssize_t y, const double lower_threshold, ExceptionInfo *exception)
 
MagickExport ImageCannyEdgeImage (const Image *image, const double radius, const double sigma, const double lower_percent, const double upper_percent, ExceptionInfo *exception)
 
static double MagickLog10 (const double x)
 
MagickExport ChannelFeaturesGetImageFeatures (const Image *image, const size_t distance, ExceptionInfo *exception)
 
static double MagickRound (double x)
 
static ImageRenderHoughLines (const ImageInfo *image_info, const size_t columns, const size_t rows, ExceptionInfo *exception)
 
MagickExport ImageHoughLineImage (const Image *image, const size_t width, const size_t height, const size_t threshold, ExceptionInfo *exception)
 
MagickExport ImageMeanShiftImage (const Image *image, const size_t width, const size_t height, const double color_distance, ExceptionInfo *exception)
 

Macro Definition Documentation

◆ BoundingBox

#define BoundingBox   "viewbox"

◆ CannyEdgeImageTag

#define CannyEdgeImageTag   "CannyEdge/Image"

◆ HoughLineImageTag

#define HoughLineImageTag   "HoughLine/Image"

◆ Log10Epsilon

#define Log10Epsilon   (1.0e-11)

◆ MaxMeanShiftIterations

#define MaxMeanShiftIterations   100

◆ MeanShiftImageTag

#define MeanShiftImageTag   "MeanShift/Image"

Typedef Documentation

◆ CannyInfo

typedef struct _CannyInfo CannyInfo

Function Documentation

◆ CannyEdgeImage()

◆ GetImageFeatures()

MagickExport ChannelFeatures * GetImageFeatures ( const Image image,
const size_t  distance,
ExceptionInfo exception 
)

Definition at line 623 of file feature.c.

References AcquireQuantumMemory(), AcquireVirtualCacheView(), _PixelPacket::alpha, _Image::alpha_trait, AlphaPixelChannel, _ChannelFeatures::angular_second_moment, _PixelPacket::black, BlackPixelChannel, _PixelPacket::blue, BluePixelChannel, CMYKColorspace, _Image::colorspace, _Image::columns, _ChannelFeatures::contrast, _ChannelFeatures::correlation, DestroyCacheView(), _ChannelFeatures::difference_entropy, _ChannelFeatures::difference_variance, _ChannelFeatures::entropy, _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelAlpha(), GetPixelBlack(), GetPixelBlue(), GetPixelChannels(), GetPixelGreen(), GetPixelRed(), _PixelPacket::green, GreenPixelChannel, _ChannelFeatures::inverse_difference_moment, IsEventLogging(), LogMagickEvent(), magick_restrict, MagickAbsoluteValue, MagickCoreSignature, MagickEpsilon, MagickFalse, MagickLog10(), MagickTrue, _ChannelFeatures::maximum_correlation_coefficient, MaxMap, MaxPixelChannels, _ChannelFeatures::measure_of_correlation_1, _ChannelFeatures::measure_of_correlation_2, PerceptibleReciprocal(), _PixelPacket::red, RedPixelChannel, RelinquishMagickMemory(), ResourceLimitError, ResourceLimitFatalError, _Image::rows, _Image::signature, _ChannelFeatures::sum_average, _ChannelFeatures::sum_entropy, _ChannelFeatures::sum_variance, ThrowFatalException, ThrowMagickException(), TraceEvent, UndefinedPixelTrait, and _ChannelFeatures::variance_sum_of_squares.

Referenced by IdentifyImage().

◆ HoughLineImage()

◆ IsAuthenticPixel()

static MagickBooleanType IsAuthenticPixel ( const Image image,
const ssize_t  x,
const ssize_t  y 
)
inlinestatic

Definition at line 147 of file feature.c.

References _Image::columns, MagickFalse, MagickTrue, and _Image::rows.

Referenced by TraceEdges().

◆ MagickLog10()

static double MagickLog10 ( const double  x)
inlinestatic

Definition at line 614 of file feature.c.

References Log10Epsilon.

Referenced by GetImageFeatures().

◆ MagickRound()

static double MagickRound ( double  x)
inlinestatic

Definition at line 1765 of file feature.c.

Referenced by HoughLineImage(), and MeanShiftImage().

◆ MeanShiftImage()

◆ RenderHoughLines()

◆ TraceEdges()

static MagickBooleanType TraceEdges ( Image edge_image,
CacheView edge_view,
MatrixInfo canny_cache,
const ssize_t  x,
const ssize_t  y,
const double  lower_threshold,
ExceptionInfo exception 
)
static