MagickCore  7.0.10
Convert, Edit, Or Compose Bitmap Images
statistic.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2020 ImageMagick Studio LLC, a non-profit organization
3  dedicated to making software imaging solutions freely available.
4 
5  You may not use this file except in compliance with the License. You may
6  obtain a copy of the License at
7 
8  https://imagemagick.org/script/license.php
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  MagickCore statistical methods.
17 */
18 #ifndef MAGICKCORE_STATISTIC_H
19 #define MAGICKCORE_STATISTIC_H
20 
21 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24 
25 #define MaximumNumberOfImageMoments 8
26 #define MaximumNumberOfPerceptualColorspaces 6
27 #define MaximumNumberOfPerceptualHashes 7
28 
29 typedef struct _ChannelStatistics
30 {
31  size_t
33 
34  double
36  minima,
37  maxima,
38  sum,
40  sum_cubed,
42  mean,
43  variance,
45  kurtosis,
46  skewness,
47  entropy;
49 
50 typedef struct _ChannelMoments
51 {
52  double
54 
55  PointInfo
58 
59  double
64 
65 typedef struct _ChannelPerceptualHash
66 {
67  double
70 
71  size_t
73 
76 
77  double
79 
80  size_t
83 
84 typedef enum
85 {
121 
122 typedef enum
123 {
130 
131 typedef enum
132 {
143 } StatisticType;
144 
147 
149  *GetImageMoments(const Image *,ExceptionInfo *);
150 
153 
154 extern MagickExport Image
156  *PolynomialImage(const Image *,const size_t,const double *,ExceptionInfo *),
157  *StatisticImage(const Image *,const StatisticType,const size_t,const size_t,
158  ExceptionInfo *);
159 
161  EvaluateImage(Image *,const MagickEvaluateOperator,const double,
162  ExceptionInfo *),
163  FunctionImage(Image *,const MagickFunction,const size_t,const double *,
164  ExceptionInfo *),
165  GetImageEntropy(const Image *,double *,ExceptionInfo *),
166  GetImageExtrema(const Image *,size_t *,size_t *,ExceptionInfo *),
167  GetImageMean(const Image *,double *,double *,ExceptionInfo *),
168  GetImageKurtosis(const Image *,double *,double *,ExceptionInfo *),
169  GetImageRange(const Image *,double *,double *,ExceptionInfo *);
170 
171 #if defined(__cplusplus) || defined(c_plusplus)
172 }
173 #endif
174 
175 #endif
Definition: statistic.h:112
Definition: statistic.h:100
double sum
Definition: statistic.h:35
Definition: statistic.h:102
StatisticType
Definition: statistic.h:131
double standard_deviation
Definition: statistic.h:35
Definition: statistic.h:86
Definition: statistic.h:125
Definition: statistic.h:118
double minima
Definition: statistic.h:35
Definition: statistic.h:88
double phash[MaximumNumberOfPerceptualColorspaces+1][MaximumNumberOfImageMoments+1]
Definition: statistic.h:78
double sum_cubed
Definition: statistic.h:35
Definition: statistic.h:117
double ellipse_angle
Definition: statistic.h:60
MagickExport MagickBooleanType FunctionImage(Image *image, const MagickFunction function, const size_t number_parameters, const double *parameters, ExceptionInfo *exception)
Definition: statistic.c:1072
MagickExport ChannelStatistics * GetImageStatistics(const Image *image, ExceptionInfo *exception)
Definition: statistic.c:1967
Definition: statistic.h:104
MagickExport MagickBooleanType EvaluateImage(Image *image, const MagickEvaluateOperator op, const double value, ExceptionInfo *exception)
Definition: statistic.c:835
double maxima
Definition: statistic.h:35
struct _ChannelMoments ChannelMoments
double area
Definition: statistic.h:35
Definition: exception.h:101
Definition: statistic.h:101
Definition: statistic.h:116
Definition: statistic.h:128
#define MaximumNumberOfImageMoments
Definition: statistic.h:25
struct _ChannelStatistics ChannelStatistics
Definition: statistic.h:50
MagickExport MagickBooleanType GetImageEntropy(const Image *image, double *entropy, ExceptionInfo *exception)
Definition: statistic.c:1191
size_t number_channels
Definition: statistic.h:81
Definition: statistic.h:115
Definition: image.h:151
Definition: statistic.h:126
Definition: statistic.h:133
Definition: statistic.h:97
Definition: statistic.h:109
double invariant[MaximumNumberOfImageMoments+1]
Definition: statistic.h:53
Definition: statistic.h:96
MagickBooleanType
Definition: magick-type.h:169
double ellipse_intensity
Definition: statistic.h:60
double mean
Definition: statistic.h:35
MagickEvaluateOperator
Definition: statistic.h:84
Definition: statistic.h:105
#define MaximumNumberOfPerceptualColorspaces
Definition: statistic.h:26
Definition: statistic.h:95
Definition: statistic.h:111
Definition: statistic.h:106
double skewness
Definition: statistic.h:35
Definition: statistic.h:94
MagickExport ChannelMoments * GetImageMoments(const Image *image, ExceptionInfo *exception)
Definition: statistic.c:1409
Definition: statistic.h:119
Definition: statistic.h:107
Definition: statistic.h:124
Definition: statistic.h:138
size_t depth
Definition: statistic.h:32
double entropy
Definition: statistic.h:35
Definition: statistic.h:87
double hclp_hu_phash[MaximumNumberOfImageMoments+1]
Definition: statistic.h:68
Definition: statistic.h:113
MagickExport MagickBooleanType GetImageRange(const Image *image, double *minima, double *maxima, ExceptionInfo *exception)
Definition: statistic.c:1832
MagickExport MagickBooleanType GetImageKurtosis(const Image *image, double *kurtosis, double *skewness, ExceptionInfo *exception)
Definition: statistic.c:1289
Definition: statistic.h:98
Definition: statistic.h:141
MagickExport MagickBooleanType GetImageMean(const Image *image, double *mean, double *standard_deviation, ExceptionInfo *exception)
Definition: statistic.c:1339
Definition: statistic.h:108
Definition: statistic.h:134
Definition: statistic.h:93
Definition: statistic.h:103
double kurtosis
Definition: statistic.h:35
MagickExport MagickBooleanType GetImageExtrema(const Image *image, size_t *minima, size_t *maxima, ExceptionInfo *exception)
Definition: statistic.c:1239
Definition: statistic.h:65
PointInfo centroid
Definition: statistic.h:56
struct _ChannelPerceptualHash ChannelPerceptualHash
Definition: statistic.h:140
Definition: statistic.h:110
Definition: statistic.h:92
size_t number_colorspaces
Definition: statistic.h:72
Definition: statistic.h:127
Definition: statistic.h:137
ColorspaceType colorspace[MaximumNumberOfPerceptualColorspaces+1]
Definition: statistic.h:75
ColorspaceType
Definition: colorspace.h:25
Definition: statistic.h:89
PointInfo ellipse_axis
Definition: statistic.h:56
double sum_squared
Definition: statistic.h:35
double ellipse_eccentricity
Definition: statistic.h:60
Definition: statistic.h:99
Definition: statistic.h:114
#define MagickExport
Definition: method-attribute.h:80
Definition: statistic.h:135
Definition: statistic.h:136
Definition: statistic.h:29
double srgb_hu_phash[MaximumNumberOfImageMoments+1]
Definition: statistic.h:68
MagickExport Image * PolynomialImage(const Image *images, const size_t number_terms, const double *terms, ExceptionInfo *exception)
Definition: statistic.c:2220
MagickExport ChannelPerceptualHash * GetImagePerceptualHash(const Image *image, ExceptionInfo *exception)
Definition: statistic.c:1724
MagickFunction
Definition: statistic.h:122
Definition: statistic.h:139
Definition: statistic.h:142
double variance
Definition: statistic.h:35
Definition: statistic.h:91
Definition: geometry.h:120
MagickExport Image * EvaluateImages(const Image *images, const MagickEvaluateOperator op, ExceptionInfo *exception)
Definition: statistic.c:474
MagickExport Image * StatisticImage(const Image *image, const StatisticType type, const size_t width, const size_t height, ExceptionInfo *exception)
Definition: statistic.c:2728
Definition: statistic.h:90
double sum_fourth_power
Definition: statistic.h:35