MagickCore  7.0.7
Convert, Edit, Or Compose Bitmap Images
identify.c File Reference
#include "MagickCore/studio.h"
#include "MagickCore/annotate.h"
#include "MagickCore/artifact.h"
#include "MagickCore/attribute.h"
#include "MagickCore/blob.h"
#include "MagickCore/cache.h"
#include "MagickCore/client.h"
#include "MagickCore/coder.h"
#include "MagickCore/color.h"
#include "MagickCore/configure.h"
#include "MagickCore/constitute.h"
#include "MagickCore/decorate.h"
#include "MagickCore/delegate.h"
#include "MagickCore/draw.h"
#include "MagickCore/effect.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/feature.h"
#include "MagickCore/gem.h"
#include "MagickCore/geometry.h"
#include "MagickCore/histogram.h"
#include "MagickCore/identify.h"
#include "MagickCore/image.h"
#include "MagickCore/image-private.h"
#include "MagickCore/list.h"
#include "MagickCore/locale_.h"
#include "MagickCore/log.h"
#include "MagickCore/magic.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
#include "MagickCore/module.h"
#include "MagickCore/monitor.h"
#include "MagickCore/montage.h"
#include "MagickCore/option.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/prepress.h"
#include "MagickCore/profile.h"
#include "MagickCore/property.h"
#include "MagickCore/quantize.h"
#include "MagickCore/quantum.h"
#include "MagickCore/random_.h"
#include "MagickCore/registry.h"
#include "MagickCore/resize.h"
#include "MagickCore/resource_.h"
#include "MagickCore/signature.h"
#include "MagickCore/statistic.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/timer.h"
#include "MagickCore/token.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
#include "MagickCore/version.h"
Include dependency graph for identify.c:

Go to the source code of this file.

Macros

#define PrintFeature(feature)
 
#define FeaturesFormat
 
#define StatisticsFormat
 

Functions

static ChannelStatisticsGetLocationStatistics (const Image *image, const StatisticType type, ExceptionInfo *exception)
 
static ssize_t PrintChannelFeatures (FILE *file, const PixelChannel channel, const char *name, const ChannelFeatures *channel_features)
 
static ssize_t PrintChannelLocations (FILE *file, const Image *image, const PixelChannel channel, const char *name, const StatisticType type, const size_t max_locations, const ChannelStatistics *channel_statistics)
 
static ssize_t PrintChannelMoments (FILE *file, const PixelChannel channel, const char *name, const double scale, const ChannelMoments *channel_moments)
 
static ssize_t PrintChannelPerceptualHash (Image *image, FILE *file, const ChannelPerceptualHash *channel_phash)
 
static ssize_t PrintChannelStatistics (FILE *file, const PixelChannel channel, const char *name, const double scale, const ChannelStatistics *channel_statistics)
 
MagickExport MagickBooleanType IdentifyImage (Image *image, FILE *file, const MagickBooleanType verbose, ExceptionInfo *exception)
 

Macro Definition Documentation

◆ FeaturesFormat

#define FeaturesFormat
Value:
" %s:\n" \
" Angular Second Moment:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n" \
" Contrast:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n" \
" Correlation:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n" \
" Sum of Squares Variance:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n" \
" Inverse Difference Moment:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n" \
" Sum Average:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n" \
" Sum Variance:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n" \
" Sum Entropy:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n" \
" Entropy:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n" \
" Difference Variance:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n" \
" Difference Entropy:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n" \
" Information Measure of Correlation 1:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n" \
" Information Measure of Correlation 2:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n" \
" Maximum Correlation Coefficient:\n" \
" %.*g, %.*g, %.*g, %.*g, %.*g\n"

Referenced by PrintChannelFeatures().

◆ PrintFeature

#define PrintFeature (   feature)
Value:
GetMagickPrecision(),(feature)[0], \
GetMagickPrecision(),(feature)[1], \
GetMagickPrecision(),(feature)[2], \
GetMagickPrecision(),(feature)[3], \
GetMagickPrecision(),((feature)[0]+(feature)[1]+(feature)[2]+(feature)[3])/4.0 \
MagickExport int GetMagickPrecision(void)
Definition: magick.c:865

Referenced by PrintChannelFeatures().

◆ StatisticsFormat

#define StatisticsFormat
Value:
" %s:\n min: %.*g (%.*g)\n " \
"max: %.*g (%.*g)\n mean: %.*g (%.*g)\n " \
"standard deviation: %.*g (%.*g)\n kurtosis: %.*g\n " \
"skewness: %.*g\n entropy: %.*g\n"

Referenced by PrintChannelStatistics().

Function Documentation

◆ GetLocationStatistics()

◆ IdentifyImage()

MagickExport MagickBooleanType IdentifyImage ( Image image,
FILE *  file,
const MagickBooleanType  verbose,
ExceptionInfo exception 
)

Definition at line 469 of file identify.c.

References AcquireImageInfo(), AcquireQuantumMemory(), _PixelInfo::alpha_trait, _Image::alpha_trait, AlphaPixelChannel, _Image::background_color, BilevelType, BlackPixelChannel, _ChromaticityInfo::blue_primary, BluePixelChannel, _Image::border_color, _Image::chromaticity, CloneString(), CMYKColorspace, _Image::colormap, _Image::colors, _Image::colorspace, _PixelInfo::colorspace, _Image::columns, CommandOptionToMnemonic(), _Image::compose, CompositePixelChannel, _Image::compression, ConcatenateColorComponent(), ConcatenateMagickString(), CopyMagickString(), CyanPixelChannel, _Image::debug, _Image::delay, _ChannelStatistics::depth, _Image::depth, DestroyImage(), DestroyImageInfo(), DestroyString(), DirectClass, _Image::directory, _Image::dispose, _Image::duration, _Image::endian, _Image::error, _Image::extract_info, _Image::filename, _ImageInfo::filename, FormatLocaleFile(), FormatLocaleString(), FormatMagickSize(), _Image::gamma, GetBlobSize(), GetColorTuple(), GetElapsedTime(), GetImageArtifact(), GetImageDepth(), GetImageFeatures(), GetImageListLength(), GetImageMoments(), GetImagePerceptualHash(), GetImageProfile(), GetImageProperty(), GetImageRegistry(), GetImageStatistics(), GetImageTotalInkDensity(), GetImageType(), GetLocationStatistics(), GetMagickDescription(), GetMagickInfo(), GetMagickMimeType(), GetMagickModule, GetMagickPrecision(), GetMagickVersion(), GetNextImageArtifact(), GetNextImageInList(), GetNextImageProfile(), GetNextImageProperty(), GetNextImageRegistry(), GetNumberColors(), GetPathComponent(), GetPixelAlpha(), GetPixelChannels(), GetPixelInfo(), GetPixelInfoPixel(), GetPreviousImageInList(), GetStringInfoDatum(), GetStringInfoLength(), GetTimerInfo(), GetUserTime(), GetVirtualPixels(), GRAYColorspace, GrayPixelChannel, GrayscaleAlphaType, GrayscaleType, _ChromaticityInfo::green_primary, GreenPixelChannel, _RectangleInfo::height, IdentifyImageType(), _Image::intensity, _Image::interlace, IsHistogramImage(), IsStringTrue(), _Image::iterations, LocaleCompare(), LogMagickEvent(), MagentaPixelChannel, _Image::magick, _Image::magick_columns, _Image::magick_filename, magick_restrict, _Image::magick_rows, MagickBooleanOptions, MagickClassOptions, MagickColorspaceOptions, MagickComposeOptions, MagickCompressOptions, MAGICKCORE_QUANTUM_DEPTH, MagickCoreSignature, MagickDisposeOptions, MagickEndianOptions, MagickEpsilon, MagickFalse, MagickIntentOptions, MagickInterlaceOptions, MagickMin, MagickOrientationOptions, MagickPathExtent, MagickPixelIntensityOptions, MagickResolutionOptions, MagickStatisticOptions, MagickTrue, MagickTypeOptions, _Image::matte_color, _ErrorInfo::mean_error_per_pixel, _Image::montage, _Image::next, _ErrorInfo::normalized_maximum_error, _ErrorInfo::normalized_mean_error, _Image::orientation, _Image::page, ParseCommandOption(), _Image::previous, PrintChannelFeatures(), PrintChannelLocations(), PrintChannelMoments(), PrintChannelPerceptualHash(), PrintChannelStatistics(), PrintStringInfo(), PseudoClass, _Image::quality, QuantumRange, QueryColorname(), ReadImage(), _ChromaticityInfo::red_primary, RedPixelChannel, registry, RelinquishMagickMemory(), _Image::rendering_intent, ResetImageArtifactIterator(), ResetImageProfileIterator(), ResetImagePropertyIterator(), ResetImageRegistryIterator(), _Image::resolution, RGBColorspace, _Image::rows, _Image::scene, sentinel, SetWarningHandler(), _Image::signature, SignatureImage(), _ImageInfo::size, sRGBColorspace, _Image::storage_class, StringRegistryType, StringToList(), StringToUnsignedLong(), SVGCompliance, TailPath, _Image::taint, _Image::ticks_per_second, _Image::tile_offset, _Image::timer, _Image::total_colors, TraceEvent, _Image::transparent_color, TransparentAlpha, _Image::type, UndefinedColorspace, UndefinedCompressionQuality, UndefinedPixelTrait, UndefinedType, _Image::units, _ChromaticityInfo::white_point, _RectangleInfo::width, _PrimaryInfo::x, _PointInfo::x, _RectangleInfo::x, X11Compliance, _PrimaryInfo::y, _PointInfo::y, _RectangleInfo::y, and YellowPixelChannel.

Referenced by PingImage(), ReadImage(), and WriteImage().

◆ PrintChannelFeatures()

static ssize_t PrintChannelFeatures ( FILE *  file,
const PixelChannel  channel,
const char *  name,
const ChannelFeatures channel_features 
)
static

Definition at line 217 of file identify.c.

References FeaturesFormat, FormatLocaleFile(), and PrintFeature.

Referenced by IdentifyImage().

◆ PrintChannelLocations()

static ssize_t PrintChannelLocations ( FILE *  file,
const Image image,
const PixelChannel  channel,
const char *  name,
const StatisticType  type,
const size_t  max_locations,
const ChannelStatistics channel_statistics 
)
static

◆ PrintChannelMoments()

static ssize_t PrintChannelMoments ( FILE *  file,
const PixelChannel  channel,
const char *  name,
const double  scale,
const ChannelMoments channel_moments 
)
static

Definition at line 348 of file identify.c.

References FormatLocaleFile(), GetMagickPrecision(), and MaximumNumberOfImageMoments.

Referenced by IdentifyImage().

◆ PrintChannelPerceptualHash()

◆ PrintChannelStatistics()

static ssize_t PrintChannelStatistics ( FILE *  file,
const PixelChannel  channel,
const char *  name,
const double  scale,
const ChannelStatistics channel_statistics 
)
static