MagickCore  7.0.7
Convert, Edit, Or Compose Bitmap Images
statistic.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2018 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.
6  obtain a copy of the License at
7 
8  https://www.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
56  centroid,
58 
59  double
60  ellipse_angle,
61  ellipse_eccentricity,
64 
65 typedef struct _ChannelPerceptualHash
66 {
67  double
68  srgb_hu_phash[MaximumNumberOfImageMoments+1],
69  hclp_hu_phash[MaximumNumberOfImageMoments+1];
70 
71  size_t
73 
76 
77  double
79 
80  size_t
83 
84 typedef enum
85 {
120 
121 typedef enum
122 {
129 
130 typedef enum
131 {
142 } StatisticType;
143 
146 
148  *GetImageMoments(const Image *,ExceptionInfo *);
149 
152 
153 extern MagickExport Image
154  *EvaluateImages(const Image *,const MagickEvaluateOperator,ExceptionInfo *),
155  *PolynomialImage(const Image *,const size_t,const double *,ExceptionInfo *),
156  *StatisticImage(const Image *,const StatisticType,const size_t,const size_t,
157  ExceptionInfo *);
158 
160  EvaluateImage(Image *,const MagickEvaluateOperator,const double,
161  ExceptionInfo *),
162  FunctionImage(Image *,const MagickFunction,const size_t,const double *,
163  ExceptionInfo *),
164  GetImageEntropy(const Image *,double *,ExceptionInfo *),
165  GetImageExtrema(const Image *,size_t *,size_t *,ExceptionInfo *),
166  GetImageMean(const Image *,double *,double *,ExceptionInfo *),
167  GetImageKurtosis(const Image *,double *,double *,ExceptionInfo *),
168  GetImageRange(const Image *,double *,double *,ExceptionInfo *);
169 
170 #if defined(__cplusplus) || defined(c_plusplus)
171 }
172 #endif
173 
174 #endif
StatisticType
Definition: statistic.h:130
double standard_deviation
Definition: statistic.h:35
MagickExport MagickBooleanType GetImageMean(const Image *, double *, double *, ExceptionInfo *)
MagickExport ChannelPerceptualHash * GetImagePerceptualHash(const Image *, ExceptionInfo *)
Definition: statistic.c:1695
MagickExport MagickBooleanType GetImageKurtosis(const Image *, double *, double *, ExceptionInfo *)
struct _ChannelMoments ChannelMoments
#define MaximumNumberOfImageMoments
Definition: statistic.h:25
struct _ChannelStatistics ChannelStatistics
MagickExport Image * EvaluateImages(const Image *, const MagickEvaluateOperator, ExceptionInfo *)
MagickExport MagickBooleanType GetImageEntropy(const Image *, double *, ExceptionInfo *)
Definition: image.h:151
MagickExport Image * StatisticImage(const Image *, const StatisticType, const size_t, const size_t, ExceptionInfo *)
Definition: statistic.c:2873
MagickBooleanType
Definition: magick-type.h:156
double ellipse_intensity
Definition: statistic.h:60
MagickEvaluateOperator
Definition: statistic.h:84
#define MaximumNumberOfPerceptualColorspaces
Definition: statistic.h:26
MagickExport MagickBooleanType GetImageRange(const Image *, double *, double *, ExceptionInfo *)
Definition: statistic.c:1803
MagickExport MagickBooleanType EvaluateImage(Image *, const MagickEvaluateOperator, const double, ExceptionInfo *)
MagickExport ChannelStatistics * GetImageStatistics(const Image *, ExceptionInfo *)
Definition: statistic.c:1943
struct _ChannelPerceptualHash ChannelPerceptualHash
MagickExport MagickBooleanType GetImageExtrema(const Image *, size_t *, size_t *, ExceptionInfo *)
MagickExport Image * PolynomialImage(const Image *, const size_t, const double *, ExceptionInfo *)
ColorspaceType
Definition: colorspace.h:25
PointInfo ellipse_axis
Definition: statistic.h:56
double sum_squared
Definition: statistic.h:35
MagickExport MagickBooleanType FunctionImage(Image *, const MagickFunction, const size_t, const double *, ExceptionInfo *)
#define MagickExport
MagickExport ChannelMoments * GetImageMoments(const Image *, ExceptionInfo *)
Definition: statistic.c:1356
MagickFunction
Definition: statistic.h:121
double sum_fourth_power
Definition: statistic.h:35