]> granicus.if.org Git - imagemagick/blob - magick/statistic.h
b030af26cfe45fa70f0887357b9ca2c2f7068588
[imagemagick] / magick / statistic.h
1 /*
2   Copyright 1999-2010 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     minima,
32     maxima,
33     sum,
34     sum_squared,
35     mean,
36     variance,
37     standard_deviation,
38     kurtosis,
39     skewness;
40 } ChannelStatistics;
41
42 typedef enum
43 {
44   UndefinedEvaluateOperator,
45   AddEvaluateOperator,
46   AndEvaluateOperator,
47   DivideEvaluateOperator,
48   LeftShiftEvaluateOperator,
49   MaxEvaluateOperator,
50   MinEvaluateOperator,
51   MultiplyEvaluateOperator,
52   OrEvaluateOperator,
53   RightShiftEvaluateOperator,
54   SetEvaluateOperator,
55   SubtractEvaluateOperator,
56   XorEvaluateOperator,
57   PowEvaluateOperator,
58   LogEvaluateOperator,
59   ThresholdEvaluateOperator,
60   ThresholdBlackEvaluateOperator,
61   ThresholdWhiteEvaluateOperator,
62   GaussianNoiseEvaluateOperator,
63   ImpulseNoiseEvaluateOperator,
64   LaplacianNoiseEvaluateOperator,
65   MultiplicativeNoiseEvaluateOperator,
66   PoissonNoiseEvaluateOperator,
67   UniformNoiseEvaluateOperator,
68   CosineEvaluateOperator,
69   SineEvaluateOperator,
70   AddModulusEvaluateOperator,
71   MeanEvaluateOperator
72 } MagickEvaluateOperator;
73
74 typedef enum
75 {
76   UndefinedFunction,
77   PolynomialFunction,
78   SinusoidFunction,
79   ArcsinFunction,
80   ArctanFunction
81 } MagickFunction;
82
83 extern MagickExport ChannelStatistics
84   *GetImageChannelStatistics(const Image *,ExceptionInfo *);
85
86 extern MagickExport Image
87   *EvaluateImages(const Image *,const MagickEvaluateOperator,ExceptionInfo *);
88
89 extern MagickExport MagickBooleanType
90   EvaluateImage(Image *,const MagickEvaluateOperator,const double,
91     ExceptionInfo *),
92   EvaluateImageChannel(Image *,const ChannelType,const MagickEvaluateOperator,
93     const double,ExceptionInfo *),
94   FunctionImage(Image *,const MagickFunction,const size_t,const double *,
95     ExceptionInfo *),
96   FunctionImageChannel(Image *,const ChannelType,const MagickFunction,
97     const size_t,const double *,ExceptionInfo *),
98   GetImageChannelExtrema(const Image *,const ChannelType,size_t *,size_t *,
99     ExceptionInfo *),
100   GetImageChannelMean(const Image *,const ChannelType,double *,double *,
101     ExceptionInfo *),
102   GetImageChannelKurtosis(const Image *,const ChannelType,double *,double *,
103     ExceptionInfo *),
104   GetImageChannelRange(const Image *,const ChannelType,double *,double *,
105     ExceptionInfo *),
106   GetImageExtrema(const Image *,size_t *,size_t *,ExceptionInfo *),
107   GetImageRange(const Image *,double *,double *,ExceptionInfo *),
108   GetImageMean(const Image *,double *,double *,ExceptionInfo *),
109   GetImageKurtosis(const Image *,double *,double *,ExceptionInfo *);
110
111 #if defined(__cplusplus) || defined(c_plusplus)
112 }
113 #endif
114
115 #endif