MagickCore  6.9.11-59
Convert, Edit, Or Compose Bitmap Images
statistic.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2021 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 #include "magick/draw.h"
26 
27 #define MaximumNumberOfImageMoments 8
28 #define MaximumNumberOfPerceptualHashes 7
29 
30 typedef struct _ChannelStatistics
31 {
32  size_t
34 
35  double
37  maxima,
38  sum,
40  sum_cubed,
42  mean,
43  variance,
45  kurtosis,
46  skewness,
47  entropy;
49 
50 #undef I
51 
52 typedef struct _ChannelMoments
53 {
54  double
55  I[32];
56 
57  PointInfo
60 
61  double
66 
67 typedef struct _ChannelPerceptualHash
68 {
69  double
70  P[32],
71  Q[32];
73 
74 typedef enum
75 {
111 
112 typedef enum
113 {
120 
121 typedef enum
122 {
133 } StatisticType;
134 
137 
140 
143 
144 extern MagickExport Image
146  *PolynomialImage(const Image *,const size_t,const double *,ExceptionInfo *),
147  *PolynomialImageChannel(const Image *,const ChannelType,const size_t,
148  const double *,ExceptionInfo *),
149  *StatisticImage(const Image *,const StatisticType,const size_t,const size_t,
150  ExceptionInfo *),
152  const size_t,const size_t,ExceptionInfo *);
153 
155  EvaluateImage(Image *,const MagickEvaluateOperator,const double,
156  ExceptionInfo *),
158  const double,ExceptionInfo *),
159  FunctionImage(Image *,const MagickFunction,const size_t,const double *,
160  ExceptionInfo *),
162  const size_t,const double *,ExceptionInfo *),
163  GetImageChannelEntropy(const Image *,const ChannelType,double *,
164  ExceptionInfo *),
165  GetImageChannelExtrema(const Image *,const ChannelType,size_t *,size_t *,
166  ExceptionInfo *),
167  GetImageChannelMean(const Image *,const ChannelType,double *,double *,
168  ExceptionInfo *),
169  GetImageChannelKurtosis(const Image *,const ChannelType,double *,double *,
170  ExceptionInfo *),
171  GetImageChannelRange(const Image *,const ChannelType,double *,double *,
172  ExceptionInfo *),
173  GetImageEntropy(const Image *,double *,ExceptionInfo *),
174  GetImageExtrema(const Image *,size_t *,size_t *,ExceptionInfo *),
175  GetImageMean(const Image *,double *,double *,ExceptionInfo *),
176  GetImageKurtosis(const Image *,double *,double *,ExceptionInfo *),
177  GetImageRange(const Image *,double *,double *,ExceptionInfo *);
178 
179 #if defined(__cplusplus) || defined(c_plusplus)
180 }
181 #endif
182 
183 #endif
Definition: statistic.h:87
Definition: statistic.h:103
double sum
Definition: statistic.h:36
Definition: statistic.h:82
StatisticType
Definition: statistic.h:121
double Q[32]
Definition: statistic.h:70
double standard_deviation
Definition: statistic.h:36
Definition: statistic.h:76
Definition: statistic.h:117
Definition: statistic.h:88
MagickExport MagickBooleanType GetImageMean(const Image *, double *, double *, ExceptionInfo *)
double minima
Definition: statistic.h:36
Definition: statistic.h:77
MagickExport MagickBooleanType GetImageKurtosis(const Image *, double *, double *, ExceptionInfo *)
double sum_cubed
Definition: statistic.h:36
Definition: statistic.h:99
double ellipse_angle
Definition: statistic.h:62
Definition: statistic.h:83
double maxima
Definition: statistic.h:36
struct _ChannelMoments ChannelMoments
Definition: exception.h:102
Definition: statistic.h:106
double I[32]
Definition: statistic.h:55
Definition: statistic.h:93
Definition: statistic.h:116
struct _ChannelStatistics ChannelStatistics
MagickExport Image * EvaluateImages(const Image *, const MagickEvaluateOperator, ExceptionInfo *)
Definition: statistic.h:52
MagickExport MagickBooleanType GetImageEntropy(const Image *, double *, ExceptionInfo *)
Definition: statistic.h:91
Definition: image.h:152
Definition: statistic.h:118
Definition: statistic.h:123
Definition: statistic.h:80
MagickExport ChannelPerceptualHash * GetImageChannelPerceptualHash(const Image *, ExceptionInfo *)
Definition: statistic.c:2113
MagickExport Image * StatisticImage(const Image *, const StatisticType, const size_t, const size_t, ExceptionInfo *)
Definition: statistic.h:108
MagickExport MagickBooleanType GetImageChannelEntropy(const Image *, const ChannelType, double *, ExceptionInfo *)
Definition: statistic.h:96
MagickBooleanType
Definition: magick-type.h:202
double ellipse_intensity
Definition: statistic.h:62
MagickExport ChannelMoments * GetImageChannelMoments(const Image *, ExceptionInfo *)
Definition: statistic.c:1665
double mean
Definition: statistic.h:36
MagickEvaluateOperator
Definition: statistic.h:74
Definition: statistic.h:84
MagickExport MagickBooleanType GetImageChannelRange(const Image *, const ChannelType, double *, double *, ExceptionInfo *)
Definition: statistic.h:95
MagickExport MagickBooleanType FunctionImageChannel(Image *, const ChannelType, const MagickFunction, const size_t, const double *, ExceptionInfo *)
Definition: statistic.h:101
Definition: statistic.h:98
MagickExport Image * PolynomialImageChannel(const Image *, const ChannelType, const size_t, const double *, ExceptionInfo *)
double skewness
Definition: statistic.h:36
MagickExport MagickBooleanType GetImageChannelMean(const Image *, const ChannelType, double *, double *, ExceptionInfo *)
Definition: statistic.h:94
Definition: statistic.h:109
Definition: statistic.h:89
Definition: statistic.h:114
Definition: statistic.h:128
MagickExport MagickBooleanType EvaluateImageChannel(Image *, const ChannelType, const MagickEvaluateOperator, const double, ExceptionInfo *)
size_t depth
Definition: statistic.h:33
double entropy
Definition: statistic.h:36
MagickExport MagickBooleanType GetImageChannelExtrema(const Image *, const ChannelType, size_t *, size_t *, ExceptionInfo *)
Definition: statistic.h:104
MagickExport ChannelStatistics * GetImageChannelStatistics(const Image *, ExceptionInfo *)
Definition: statistic.c:2338
MagickExport MagickBooleanType GetImageRange(const Image *, double *, double *, ExceptionInfo *)
Definition: statistic.c:2222
MagickExport MagickBooleanType EvaluateImage(Image *, const MagickEvaluateOperator, const double, ExceptionInfo *)
Definition: statistic.h:107
Definition: statistic.h:90
Definition: statistic.h:132
Definition: statistic.h:85
Definition: statistic.h:124
Definition: statistic.h:105
Definition: statistic.h:97
ChannelType
Definition: magick-type.h:168
double kurtosis
Definition: statistic.h:36
MagickExport Image * StatisticImageChannel(const Image *, const ChannelType, const StatisticType, const size_t, const size_t, ExceptionInfo *)
Definition: statistic.c:3600
Definition: statistic.h:67
PointInfo centroid
Definition: statistic.h:58
struct _ChannelPerceptualHash ChannelPerceptualHash
Definition: statistic.h:130
MagickExport MagickBooleanType GetImageExtrema(const Image *, size_t *, size_t *, ExceptionInfo *)
Definition: statistic.h:86
Definition: statistic.h:79
Definition: statistic.h:115
Definition: statistic.h:127
MagickExport Image * PolynomialImage(const Image *, const size_t, const double *, ExceptionInfo *)
Definition: statistic.h:102
PointInfo ellipse_axis
Definition: statistic.h:58
MagickExport MagickBooleanType GetImageChannelKurtosis(const Image *, const ChannelType, double *, double *, ExceptionInfo *)
double sum_squared
Definition: statistic.h:36
double ellipse_eccentricity
Definition: statistic.h:62
MagickExport MagickBooleanType FunctionImage(Image *, const MagickFunction, const size_t, const double *, ExceptionInfo *)
Definition: statistic.h:81
Definition: statistic.h:92
#define MagickExport
Definition: method-attribute.h:80
Definition: statistic.h:125
Definition: statistic.h:126
Definition: statistic.h:30
double P[32]
Definition: statistic.h:70
MagickFunction
Definition: statistic.h:112
Definition: statistic.h:129
Definition: statistic.h:131
double variance
Definition: statistic.h:36
Definition: statistic.h:100
Definition: draw.h:138
Definition: statistic.h:78
double sum_fourth_power
Definition: statistic.h:36