compare - Compare images
Image * DifferenceImage( const Image *reference_image, const Image *compare_image, const DifferenceImageOptions *difference_options, ExceptionInfo *exception );
void DifferenceImageOptionsDefaults( DifferenceImageOptions *options );
unsigned int IsImagesEqual( Image *image, const Image *reference );
DifferenceImageOptionsDefaults() assigns default options to a user-provided DifferenceImageOptions structure. This function should always be used to initialize the DifferenceImageOptions structure prior to making any changes to it.
The format of the DifferenceImageOptionsDefaults method is:
void DifferenceImageOptionsDefaults ( DifferenceImageOptions *options );
A description of each parameter follows:
pointer to DifferenceImageOptions structure to initialize.
DifferenceImage() returns an annotated difference image based on the the difference between a reference image and a compare image.
The format of the DifferenceImage method is:
Image *DifferenceImage ( const Image *reference_image, const Image *compare_image, const DifferenceImageOptions *difference_options, ExceptionInfo *exception );
A description of each parameter follows:
the reference image.
the comparison image.
options to use when comparing.
the channel(s)
to compare.
Return any errors or warnings in this structure.
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:
The mean error for any single pixel in the image.
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.
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.
The image.
The reference image.