summaryrefslogtreecommitdiff
path: root/dmagick/c/compare.d
blob: 8a988efb95a9ba2adc852d3e2e7faeff3329fb95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
module dmagick.c.compare;

import dmagick.c.exception;
import dmagick.c.geometry;
import dmagick.c.image;
import dmagick.c.magickType;

extern(C)
{
	enum MetricType
	{
		UndefinedMetric,
		AbsoluteErrorMetric,
		MeanAbsoluteErrorMetric,
		MeanErrorPerPixelMetric,
		MeanSquaredErrorMetric,
		PeakAbsoluteErrorMetric,
		PeakSignalToNoiseRatioMetric,
		RootMeanSquaredErrorMetric,
		NormalizedCrossCorrelationErrorMetric,
		FuzzErrorMetric
	}

	double* GetImageChannelDistortions(Image*, const(Image)*, const MetricType, ExceptionInfo*);

	Image* CompareImageChannels(Image*, const(Image)*, const ChannelType, const MetricType, double*, ExceptionInfo*);
	Image* CompareImages(Image*, const(Image)*, const MetricType, double*, ExceptionInfo*);
	Image* SimilarityImage(Image*, const(Image)*, RectangleInfo*, double*, ExceptionInfo*);

	static if ( MagickLibVersion >= 0x674 )
	{
		Image* SimilarityMetricImage(Image*, const(Image)*, const MetricType, RectangleInfo*, double*, ExceptionInfo*);
	}

	MagickBooleanType GetImageChannelDistortion(Image*, const(Image)*, const ChannelType, const MetricType, double*, ExceptionInfo*);
	MagickBooleanType GetImageDistortion(Image*, const(Image)*, const MetricType, double*, ExceptionInfo*);
	MagickBooleanType IsImagesEqual(Image*, const(Image)*);
}