2 Copyright 1999-2015 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 http://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 MaximumNumberOfPerceptualHashes 7
28 typedef struct _ChannelStatistics
49 typedef struct _ChannelMoments
52 invariant[MaximumNumberOfImageMoments+1];
64 typedef struct _ChannelPerceptualHash
67 srgb_hu_phash[MaximumNumberOfImageMoments+1],
68 hclp_hu_phash[MaximumNumberOfImageMoments+1];
69 } ChannelPerceptualHash;
73 UndefinedEvaluateOperator,
76 AddModulusEvaluateOperator,
78 CosineEvaluateOperator,
79 DivideEvaluateOperator,
80 ExponentialEvaluateOperator,
81 GaussianNoiseEvaluateOperator,
82 ImpulseNoiseEvaluateOperator,
83 LaplacianNoiseEvaluateOperator,
84 LeftShiftEvaluateOperator,
88 MedianEvaluateOperator,
90 MultiplicativeNoiseEvaluateOperator,
91 MultiplyEvaluateOperator,
93 PoissonNoiseEvaluateOperator,
95 RightShiftEvaluateOperator,
96 RootMeanSquareEvaluateOperator,
99 SubtractEvaluateOperator,
101 ThresholdBlackEvaluateOperator,
102 ThresholdEvaluateOperator,
103 ThresholdWhiteEvaluateOperator,
104 UniformNoiseEvaluateOperator,
106 } MagickEvaluateOperator;
127 RootMeanSquareStatistic,
128 StandardDeviationStatistic
131 extern MagickExport ChannelStatistics
132 *GetImageStatistics(const Image *,ExceptionInfo *);
134 extern MagickExport ChannelMoments
135 *GetImageMoments(const Image *,ExceptionInfo *);
137 extern MagickExport ChannelPerceptualHash
138 *GetImagePerceptualHash(const Image *,ExceptionInfo *);
140 extern MagickExport Image
141 *EvaluateImages(const Image *,const MagickEvaluateOperator,ExceptionInfo *),
142 *PolynomialImage(const Image *,const size_t,const double *,ExceptionInfo *),
143 *StatisticImage(const Image *,const StatisticType,const size_t,const size_t,
146 extern MagickExport MagickBooleanType
147 EvaluateImage(Image *,const MagickEvaluateOperator,const double,
149 FunctionImage(Image *,const MagickFunction,const size_t,const double *,
151 GetImageEntropy(const Image *,double *,ExceptionInfo *),
152 GetImageExtrema(const Image *,size_t *,size_t *,ExceptionInfo *),
153 GetImageMean(const Image *,double *,double *,ExceptionInfo *),
154 GetImageKurtosis(const Image *,double *,double *,ExceptionInfo *),
155 GetImageRange(const Image *,double *,double *,ExceptionInfo *);
157 #if defined(__cplusplus) || defined(c_plusplus)