]> granicus.if.org Git - imagemagick/blob - MagickCore/statistic.h
(no commit message)
[imagemagick] / MagickCore / statistic.h
1 /*
2   Copyright 1999-2013 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     http://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 typedef struct _ChannelStatistics
26 {
27   size_t
28     depth;
29
30   double
31     area,
32     minima,
33     maxima,
34     sum,
35     sum_squared,
36     sum_cubed,
37     sum_fourth_power,
38     mean,
39     variance,
40     standard_deviation,
41     kurtosis,
42     skewness;
43 } ChannelStatistics;
44
45 typedef enum
46 {
47   UndefinedEvaluateOperator,
48   AbsEvaluateOperator,
49   AddEvaluateOperator,
50   AddModulusEvaluateOperator,
51   AndEvaluateOperator,
52   CosineEvaluateOperator,
53   DivideEvaluateOperator,
54   ExponentialEvaluateOperator,
55   GaussianNoiseEvaluateOperator,
56   ImpulseNoiseEvaluateOperator,
57   LaplacianNoiseEvaluateOperator,
58   LeftShiftEvaluateOperator,
59   LogEvaluateOperator,
60   MaxEvaluateOperator,
61   MeanEvaluateOperator,
62   MedianEvaluateOperator,
63   MinEvaluateOperator,
64   MultiplicativeNoiseEvaluateOperator,
65   MultiplyEvaluateOperator,
66   OrEvaluateOperator,
67   PoissonNoiseEvaluateOperator,
68   PowEvaluateOperator,
69   RightShiftEvaluateOperator,
70   SetEvaluateOperator,
71   SineEvaluateOperator,
72   SubtractEvaluateOperator,
73   SumEvaluateOperator,
74   ThresholdBlackEvaluateOperator,
75   ThresholdEvaluateOperator,
76   ThresholdWhiteEvaluateOperator,
77   UniformNoiseEvaluateOperator,
78   XorEvaluateOperator
79 } MagickEvaluateOperator;
80
81 typedef enum
82 {
83   UndefinedFunction,
84   PolynomialFunction,
85   SinusoidFunction,
86   ArcsinFunction,
87   ArctanFunction
88 } MagickFunction;
89
90 typedef enum
91 {
92   UndefinedStatistic,
93   GradientStatistic,
94   MaximumStatistic,
95   MeanStatistic,
96   MedianStatistic,
97   MinimumStatistic,
98   ModeStatistic,
99   NonpeakStatistic,
100   StandardDeviationStatistic
101 } StatisticType;
102
103 extern MagickExport ChannelStatistics
104   *GetImageStatistics(const Image *,ExceptionInfo *);
105
106 extern MagickExport Image
107   *EvaluateImages(const Image *,const MagickEvaluateOperator,ExceptionInfo *),
108   *PolynomialImage(const Image *,const size_t,const double *,ExceptionInfo *),
109   *StatisticImage(const Image *,const StatisticType,const size_t,const size_t,
110     ExceptionInfo *);
111
112 extern MagickExport MagickBooleanType
113   EvaluateImage(Image *,const MagickEvaluateOperator,const double,
114     ExceptionInfo *),
115   FunctionImage(Image *,const MagickFunction,const size_t,const double *,
116     ExceptionInfo *),
117   GetImageExtrema(const Image *,size_t *,size_t *,ExceptionInfo *),
118   GetImageMean(const Image *,double *,double *,ExceptionInfo *),
119   GetImageKurtosis(const Image *,double *,double *,ExceptionInfo *),
120   GetImageRange(const Image *,double *,double *,ExceptionInfo *);
121
122 #if defined(__cplusplus) || defined(c_plusplus)
123 }
124 #endif
125
126 #endif