statistic.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2019 ImageMagick Studio LLC, a non-profit organization
00003   dedicated to making software imaging solutions freely available.
00004   
00005   You may not use this file except in compliance with the License.  You may
00006   obtain a copy of the License at
00007   
00008     https://imagemagick.org/script/license.php
00009   
00010   Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013   See the License for the specific language governing permissions and
00014   limitations under the License.
00015 
00016   MagickCore statistical methods.
00017 */
00018 #ifndef MAGICKCORE_STATISTIC_H
00019 #define MAGICKCORE_STATISTIC_H
00020 
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024 
00025 #include "magick/draw.h"
00026 
00027 #define MaximumNumberOfImageMoments  8
00028 #define MaximumNumberOfPerceptualHashes  7
00029 
00030 typedef struct _ChannelStatistics
00031 {
00032   size_t
00033     depth;
00034 
00035   double
00036     minima,
00037     maxima,
00038     sum,
00039     sum_squared,
00040     sum_cubed,
00041     sum_fourth_power,
00042     mean,
00043     variance,
00044     standard_deviation,
00045     kurtosis,
00046     skewness,
00047     entropy;
00048 } ChannelStatistics;
00049 
00050 #undef I
00051 
00052 typedef struct _ChannelMoments
00053 {
00054   double
00055     I[32];
00056 
00057   PointInfo
00058     centroid,
00059     ellipse_axis;
00060 
00061   double
00062     ellipse_angle,
00063     ellipse_eccentricity,
00064     ellipse_intensity;
00065 } ChannelMoments;
00066 
00067 typedef struct _ChannelPerceptualHash
00068 {
00069   double
00070     P[32],
00071     Q[32];
00072 } ChannelPerceptualHash;
00073 
00074 typedef enum
00075 {
00076   UndefinedEvaluateOperator,
00077   AddEvaluateOperator,
00078   AndEvaluateOperator,
00079   DivideEvaluateOperator,
00080   LeftShiftEvaluateOperator,
00081   MaxEvaluateOperator,
00082   MinEvaluateOperator,
00083   MultiplyEvaluateOperator,
00084   OrEvaluateOperator,
00085   RightShiftEvaluateOperator,
00086   SetEvaluateOperator,
00087   SubtractEvaluateOperator,
00088   XorEvaluateOperator,
00089   PowEvaluateOperator,
00090   LogEvaluateOperator,
00091   ThresholdEvaluateOperator,
00092   ThresholdBlackEvaluateOperator,
00093   ThresholdWhiteEvaluateOperator,
00094   GaussianNoiseEvaluateOperator,
00095   ImpulseNoiseEvaluateOperator,
00096   LaplacianNoiseEvaluateOperator,
00097   MultiplicativeNoiseEvaluateOperator,
00098   PoissonNoiseEvaluateOperator,
00099   UniformNoiseEvaluateOperator,
00100   CosineEvaluateOperator,
00101   SineEvaluateOperator,
00102   AddModulusEvaluateOperator,
00103   MeanEvaluateOperator,
00104   AbsEvaluateOperator,
00105   ExponentialEvaluateOperator,
00106   MedianEvaluateOperator,
00107   SumEvaluateOperator,
00108   RootMeanSquareEvaluateOperator
00109 } MagickEvaluateOperator;
00110 
00111 typedef enum
00112 {
00113   UndefinedFunction,
00114   PolynomialFunction,
00115   SinusoidFunction,
00116   ArcsinFunction,
00117   ArctanFunction
00118 } MagickFunction;
00119 
00120 typedef enum
00121 {
00122   UndefinedStatistic,
00123   GradientStatistic,
00124   MaximumStatistic,
00125   MeanStatistic,
00126   MedianStatistic,
00127   MinimumStatistic,
00128   ModeStatistic,
00129   NonpeakStatistic,
00130   StandardDeviationStatistic,
00131   RootMeanSquareStatistic
00132 } StatisticType;
00133 
00134 extern MagickExport ChannelStatistics
00135   *GetImageChannelStatistics(const Image *,ExceptionInfo *);
00136 
00137 extern MagickExport ChannelMoments
00138   *GetImageChannelMoments(const Image *,ExceptionInfo *);
00139 
00140 extern MagickExport ChannelPerceptualHash
00141   *GetImageChannelPerceptualHash(const Image *,ExceptionInfo *);
00142 
00143 extern MagickExport Image
00144   *EvaluateImages(const Image *,const MagickEvaluateOperator,ExceptionInfo *),
00145   *PolynomialImage(const Image *,const size_t,const double *,ExceptionInfo *),
00146   *PolynomialImageChannel(const Image *,const ChannelType,const size_t,
00147     const double *,ExceptionInfo *),
00148   *StatisticImage(const Image *,const StatisticType,const size_t,const size_t,
00149     ExceptionInfo *),
00150   *StatisticImageChannel(const Image *,const ChannelType,const StatisticType,
00151     const size_t,const size_t,ExceptionInfo *);
00152 
00153 extern MagickExport MagickBooleanType
00154   EvaluateImage(Image *,const MagickEvaluateOperator,const double,
00155     ExceptionInfo *),
00156   EvaluateImageChannel(Image *,const ChannelType,const MagickEvaluateOperator,
00157     const double,ExceptionInfo *),
00158   FunctionImage(Image *,const MagickFunction,const size_t,const double *,
00159     ExceptionInfo *),
00160   FunctionImageChannel(Image *,const ChannelType,const MagickFunction,
00161     const size_t,const double *,ExceptionInfo *),
00162   GetImageChannelEntropy(const Image *,const ChannelType,double *,
00163     ExceptionInfo *),
00164   GetImageChannelExtrema(const Image *,const ChannelType,size_t *,size_t *,
00165     ExceptionInfo *),
00166   GetImageChannelMean(const Image *,const ChannelType,double *,double *,
00167     ExceptionInfo *),
00168   GetImageChannelKurtosis(const Image *,const ChannelType,double *,double *,
00169     ExceptionInfo *),
00170   GetImageChannelRange(const Image *,const ChannelType,double *,double *,
00171     ExceptionInfo *),
00172   GetImageEntropy(const Image *,double *,ExceptionInfo *),
00173   GetImageExtrema(const Image *,size_t *,size_t *,ExceptionInfo *),
00174   GetImageMean(const Image *,double *,double *,ExceptionInfo *),
00175   GetImageKurtosis(const Image *,double *,double *,ExceptionInfo *),
00176   GetImageRange(const Image *,double *,double *,ExceptionInfo *);
00177 
00178 #if defined(__cplusplus) || defined(c_plusplus)
00179 }
00180 #endif
00181 
00182 #endif

Generated on 22 Jul 2019 for MagickCore by  doxygen 1.6.1