MagickCore  7.1.0
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 #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,
48  median;
50 
51 typedef struct _ChannelMoments
52 {
53  double
55 
56  PointInfo
59 
60  double
65 
66 typedef struct _ChannelPerceptualHash
67 {
68  double
71 
72  size_t
74 
77 
78  double
80 
81  size_t
84 
85 typedef enum
86 {
122 
123 typedef enum
124 {
131 
132 typedef enum
133 {
145 } StatisticType;
146 
149 
151  *GetImageMoments(const Image *,ExceptionInfo *);
152 
155 
156 extern MagickExport Image
158  *PolynomialImage(const Image *,const size_t,const double *,ExceptionInfo *),
159  *StatisticImage(const Image *,const StatisticType,const size_t,const size_t,
160  ExceptionInfo *);
161 
163  EvaluateImage(Image *,const MagickEvaluateOperator,const double,
164  ExceptionInfo *),
165  FunctionImage(Image *,const MagickFunction,const size_t,const double *,
166  ExceptionInfo *),
167  GetImageEntropy(const Image *,double *,ExceptionInfo *),
168  GetImageExtrema(const Image *,size_t *,size_t *,ExceptionInfo *),
169  GetImageMean(const Image *,double *,double *,ExceptionInfo *),
170  GetImageMedian(const Image *,double *,ExceptionInfo *),
171  GetImageKurtosis(const Image *,double *,double *,ExceptionInfo *),
172  GetImageRange(const Image *,double *,double *,ExceptionInfo *);
173 
174 #if defined(__cplusplus) || defined(c_plusplus)
175 }
176 #endif
177 
178 #endif
StatisticType
Definition: statistic.h:132
double standard_deviation
Definition: statistic.h:35
MagickExport MagickBooleanType GetImageMean(const Image *, double *, double *, ExceptionInfo *)
MagickExport ChannelPerceptualHash * GetImagePerceptualHash(const Image *, ExceptionInfo *)
Definition: statistic.c:1780
double phash[MaximumNumberOfPerceptualColorspaces+1][MaximumNumberOfImageMoments+1]
Definition: statistic.h:79
MagickExport MagickBooleanType GetImageKurtosis(const Image *, double *, double *, ExceptionInfo *)
double ellipse_angle
Definition: statistic.h:61
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:2898
double invariant[MaximumNumberOfImageMoments+1]
Definition: statistic.h:54
MagickBooleanType
Definition: magick-type.h:165
double ellipse_intensity
Definition: statistic.h:61
MagickEvaluateOperator
Definition: statistic.h:85
#define MaximumNumberOfPerceptualColorspaces
Definition: statistic.h:26
MagickExport MagickBooleanType GetImageRange(const Image *, double *, double *, ExceptionInfo *)
Definition: statistic.c:1886
double hclp_hu_phash[MaximumNumberOfImageMoments+1]
Definition: statistic.h:69
MagickExport MagickBooleanType EvaluateImage(Image *, const MagickEvaluateOperator, const double, ExceptionInfo *)
MagickExport MagickBooleanType GetImageMedian(const Image *, double *, ExceptionInfo *)
PointInfo centroid
Definition: statistic.h:57
MagickExport ChannelStatistics * GetImageStatistics(const Image *, ExceptionInfo *)
Definition: statistic.c:2073
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 colorspace[MaximumNumberOfPerceptualColorspaces+1]
Definition: statistic.h:76
ColorspaceType
Definition: colorspace.h:25
PointInfo ellipse_axis
Definition: statistic.h:57
double sum_squared
Definition: statistic.h:35
double ellipse_eccentricity
Definition: statistic.h:61
MagickExport MagickBooleanType FunctionImage(Image *, const MagickFunction, const size_t, const double *, ExceptionInfo *)
#define MagickExport
MagickExport ChannelMoments * GetImageMoments(const Image *, ExceptionInfo *)
Definition: statistic.c:1463
double srgb_hu_phash[MaximumNumberOfImageMoments+1]
Definition: statistic.h:69
MagickFunction
Definition: statistic.h:123
double sum_fourth_power
Definition: statistic.h:35