NAME

compare - Compare images


SYNOPSIS

Image * CompareImageChannels( const Image *reference_image, const Image *compare_image, const ChannelType channel, const MetricType metric, double *distortion, ExceptionInfo *exception );

Image * CompareImages( const Image *reference_image, const Image *compare_image, const MetricType metric, double *distortion, ExceptionInfo *exception );

unsigned int IsImagesEqual( Image *image, const Image *reference );


FUNCTION DESCRIPTIONS

CompareImageChannels

CompareImageChannels() compares one or more image channels of an image with those in a second image and returns a difference image.

The format of the CompareImageChannels method is:

Image *CompareImageChannels ( const Image *reference_image, const Image *compare_image, const ChannelType channel, const MetricType metric, double *distortion, ExceptionInfo *exception );

A description of each parameter follows:

reference_image:

the reference image.

compare_image:

the comparison image.

channel:

the channel(s) to compare.

metric:

the comparison metric (UndefinedMetric, MeanAbsoluteErrorMetric, MeanSquaredErrorMetric, PeakAbsoluteErrorMetric, PeakSignalToNoiseRatioMetric, or RootMeanSquaredErrorMetric)

distortion:

the computed distortion between the images based on the specified metric.

exception:

Return any errors or warnings in this structure.

CompareImages

CompareImages() compares an image to a second image and returns a difference image.

The format of the CompareImages method is:

Image *CompareImages ( const Image *reference_image, const Image *compare_image, const MetricType metric, double *distortion, ExceptionInfo *exception );

A description of each parameter follows:

reference_image:

the reference image.

compare_image:

the comparison image.

metric:

the comparison metric (UndefinedMetric, MeanAbsoluteErrorMetric, MeanSquaredErrorMetric, PeakAbsoluteErrorMetric, PeakSignalToNoiseRatioMetric, or RootMeanSquaredErrorMetric)

distortion:

the computed distortion between the images based on the specified metric.

exception:

Return any errors or warnings in this structure.

IsImagesEqual

IsImagesEqual() measures the difference between colors at each pixel location of two images. A value other than 0 means the colors match exactly. Otherwise an error measure is computed by summing over all pixels in an image the distance squared in RGB space between each image pixel and its corresponding pixel in the reference image. The error measure is assigned to these image members:
mean_error_per_pixel:

The mean error for any single pixel in the image.

normalized_mean_error:

The normalized mean quantization error for any single pixel in the image. This distance measure is normalized to a range between 0 and 1. It is independent of the range of red, green, and blue values in the image.

normalized_maximum_error:

The normalized maximum quantization error for any single pixel in the image. This distance measure is normalized to a range between 0 and 1. It is independent of the range of red, green, and blue values in your image.

A small normalized mean square error, accessed as image->normalized_mean_error, suggests the images are very similiar in spatial layout and color.

The format of the IsImagesEqual method is:

unsigned int IsImagesEqual ( Image *image, const Image *reference );

A description of each parameter follows.

image:

The image.

reference:

The reference image.