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