ImageMagick: MagickCore, C API for ImageMagick: Compare an Image to a Reconstructed Image
Author: ImageMagick Studio LLC
Description: ImageMagick (TM) is a free software suite to create, edit and compose bitmap images. It can read, convert and write images in a large variety of formats. Images can be cropped, colors can be changed, various effects can be applied, images can be rotated and combined, and text, lines, polygons, ellipses and Bézier curves can be added to images and stretched and rotated. ImageMagick is free software: it is delivered with full source code and can be freely used, copied, modified and distributed. Its license is compatible with the GPL. It runs on all major operating systems. Most of the functionality of ImageMagick can be used interactively from the command line; more often, however, the features are used from programs written in the programming languages Perl, C, C++, Python, PHP, Ruby or Java, for which ready-made ImageMagick interfaces (PerlMagick, Magick++, PythonMagick, MagickWand for PHP, RubyMagick, and JMagick) are available. This makes it possible to modify or create images automa [cell cut: 1159 characters, first 1000 kept]
Keywords: magickcore, c, api, for, imagemagick:, compare, an, image, to, a, reconstructed, image, ImageMagick, PerlMagick, Magick++, Image, Magick

## CompareImageChannels CompareImageChannels() compares one or more image channels of an image to a reconstructed image and returns the difference image. The format of the CompareImageChannels method is:
      Image *CompareImageChannels(const Image *image,
        const Image *reconstruct_image,const ChannelType channel,
        const MetricType metric,double *distortion,ExceptionInfo *exception)
A description of each parameter follows: #### image The image. #### reconstruct_image The reconstruct image. #### channel The channel. #### metric The metric. #### distortion The computed distortion between the images. #### exception Return any errors or warnings in this structure. ## CompareImageCommand CompareImageCommand() compares two images and returns the difference between them as a distortion metric and as a new image visually annotating their differences. The format of the CompareImageCommand method is:
      MagickBooleanType CompareImageCommand(ImageInfo *image_info,int argc,
        char **argv,char **metadata,ExceptionInfo *exception)
A description of each parameter follows: #### image_info The image info. #### argc The number of elements in the argument vector. #### argv A text array containing the command line arguments. #### metadata any metadata is returned here. #### exception Return any errors or warnings in this structure. ## GetImageChannelDistrortion GetImageChannelDistrortion() compares one or more image channels of an image to a reconstructed image and returns the specified distortion metric. The format of the CompareImageChannels method is:
      MagickBooleanType GetImageChhannelDistortion(const Image *image,
        const Image *reconstruct_image,const ChannelType channel,
        const MetricType metric,double *distortion,ExceptionInfo *exception)
A description of each parameter follows: #### image The image. #### reconstruct_image The reconstruct image. #### channel The channel. #### metric The metric. #### distortion The computed distortion between the images. #### 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 reconstruct image. The error measure is assigned to these image members:
          o 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:
      MagickBooleanType IsImagesEqual(Image *image,
        const Image *reconstruct_image)
A description of each parameter follows. #### image The image. #### reconstruct_image The reconstruct image. |

Discourse Server | Mailing Lists | Image Gallery | ImageMagick Studio
© 1999-2005 ImageMagick Studio LLC