MagickCore 6.9.13-26
Convert, Edit, Or Compose Bitmap Images
Loading...
Searching...
No Matches
compare.h
1/*
2 Copyright 1999 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. You may
6 obtain a copy of the License at
7
8 https://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 image compare methods.
17*/
18#ifndef MAGICKCORE_COMPARE_H
19#define MAGICKCORE_COMPARE_H
20
21#include "magick/image.h"
22
23#if defined(__cplusplus) || defined(c_plusplus)
24extern "C" {
25#endif
26
27#define MagickPSNRDistortion (10.0*log10(1.0/MagickEpsilon))
28
29typedef enum
30{
31 UndefinedMetric,
32 AbsoluteErrorMetric,
33 MeanAbsoluteErrorMetric,
34 MeanErrorPerPixelMetric,
35 MeanSquaredErrorMetric,
36 PeakAbsoluteErrorMetric,
37 PeakSignalToNoiseRatioMetric,
38 RootMeanSquaredErrorMetric,
39 NormalizedCrossCorrelationErrorMetric,
40 FuzzErrorMetric,
41 UndefinedErrorMetric = 0,
42 PerceptualHashErrorMetric = 0xff
43} MetricType;
44
45extern MagickExport double
46 *GetImageChannelDistortions(Image *,const Image *,const MetricType,
47 ExceptionInfo *);
48
49extern MagickExport Image
50 *CompareImageChannels(Image *,const Image *,const ChannelType,
51 const MetricType,double *,ExceptionInfo *),
52 *CompareImages(Image *,const Image *,const MetricType,double *,
53 ExceptionInfo *),
54 *SimilarityImage(Image *,const Image *,RectangleInfo *,double *,
55 ExceptionInfo *),
56 *SimilarityMetricImage(Image *,const Image *,const MetricType,
57 RectangleInfo *,double *,ExceptionInfo *);
58
59extern MagickExport MagickBooleanType
60 GetImageChannelDistortion(Image *,const Image *,const ChannelType,
61 const MetricType,double *,ExceptionInfo *),
62 GetImageDistortion(Image *,const Image *,const MetricType,double *,
63 ExceptionInfo *),
64 IsImagesEqual(Image *,const Image *);
65
66#if defined(__cplusplus) || defined(c_plusplus)
67}
68#endif
69
70#endif