2 Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
8 https://www.imagemagick.org/script/license.php
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.
16 MagickCore statistical methods.
18 #ifndef MAGICKCORE_STATISTIC_H
19 #define MAGICKCORE_STATISTIC_H
21 #if defined(__cplusplus) || defined(c_plusplus)
25 #define MaximumNumberOfImageMoments 8
26 #define MaximumNumberOfPerceptualColorspaces 6
27 #define MaximumNumberOfPerceptualHashes 7
29 typedef struct _ChannelStatistics
50 typedef struct _ChannelMoments
53 invariant[MaximumNumberOfImageMoments+1];
65 typedef struct _ChannelPerceptualHash
68 srgb_hu_phash[MaximumNumberOfImageMoments+1],
69 hclp_hu_phash[MaximumNumberOfImageMoments+1];
75 colorspace[MaximumNumberOfPerceptualColorspaces+1];
78 phash[MaximumNumberOfPerceptualColorspaces+1][MaximumNumberOfImageMoments+1];
82 } ChannelPerceptualHash;
86 UndefinedEvaluateOperator,
89 AddModulusEvaluateOperator,
91 CosineEvaluateOperator,
92 DivideEvaluateOperator,
93 ExponentialEvaluateOperator,
94 GaussianNoiseEvaluateOperator,
95 ImpulseNoiseEvaluateOperator,
96 LaplacianNoiseEvaluateOperator,
97 LeftShiftEvaluateOperator,
100 MeanEvaluateOperator,
101 MedianEvaluateOperator,
103 MultiplicativeNoiseEvaluateOperator,
104 MultiplyEvaluateOperator,
106 PoissonNoiseEvaluateOperator,
108 RightShiftEvaluateOperator,
109 RootMeanSquareEvaluateOperator,
111 SineEvaluateOperator,
112 SubtractEvaluateOperator,
114 ThresholdBlackEvaluateOperator,
115 ThresholdEvaluateOperator,
116 ThresholdWhiteEvaluateOperator,
117 UniformNoiseEvaluateOperator,
119 } MagickEvaluateOperator;
140 RootMeanSquareStatistic,
141 StandardDeviationStatistic
144 extern MagickExport ChannelStatistics
145 *GetImageStatistics(const Image *,ExceptionInfo *);
147 extern MagickExport ChannelMoments
148 *GetImageMoments(const Image *,ExceptionInfo *);
150 extern MagickExport ChannelPerceptualHash
151 *GetImagePerceptualHash(const Image *,ExceptionInfo *);
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,
159 extern MagickExport MagickBooleanType
160 EvaluateImage(Image *,const MagickEvaluateOperator,const double,
162 FunctionImage(Image *,const MagickFunction,const size_t,const double *,
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 *);
170 #if defined(__cplusplus) || defined(c_plusplus)