Main Page | Modules | Class List | File List | Class Members | File Members

Image Comparison
[Image Package]


Enumerations

enum  Gan_PixelComparison {
  GAN_IMAGES_IDENTICAL, GAN_IMAGE_FORMATS_DIFFERENT, GAN_IMAGE_SIZES_DIFFERENT, GAN_IMAGE_PIXELS_DIFFERENT,
  GAN_IMAGES_SIMILAR, GAN_IMAGES_NOT_SIMILAR
}
 Result of image comparison. More...

Functions

Gan_Bool gan_image_compare (Gan_Image *image1, Gan_Image *image2, double pixel_thres, double proportion_thres, Gan_PixelComparison *result)
 Compares two images.

Enumeration Type Documentation

enum Gan_PixelComparison
 

Result of image comparison.

Enumeration values:
GAN_IMAGES_IDENTICAL  the images are the same
GAN_IMAGE_FORMATS_DIFFERENT  the formats of the images are different
GAN_IMAGE_SIZES_DIFFERENT  the widths and/or heights of the images are different
GAN_IMAGE_PIXELS_DIFFERENT  one or more pixels are different
GAN_IMAGES_SIMILAR  ratio of different pixels <= similarity_thres
GAN_IMAGES_NOT_SIMILAR  ratio of different pixels > similarity_thres


Function Documentation

Gan_Bool gan_image_compare Gan_Image image1,
Gan_Image image2,
double  pixel_thres,
double  proportion_thres,
Gan_PixelComparison result
 

Compares two images.

Parameters:
image1 The first image
image2 The second image
pixel_thres The threshold to decide if two pixels are the same
proportion_thres Thhreshold on the proportion of similar pixels
result Pointer to result enumerated variable
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Compares the format, dimensions and contents of two images. The pixel comparison is to within the provided threshold pixel_thres. If proportion_thres is greater than zero, the result is returned as GAN_IMAGES_SIMILAR if the ratio of different pixels is less than proportion_thres, or GAN_IMAGES_NOT_SIMILAR if the ratio is greater than proportion_thres. If proportion_thres if zero, a single different pixel causes GAN_IMAGE_PIXELS_DIFFERENT to be returned. If all pixel differences are within pixel_thres then GAN_IMAGES_IDENTICAL is returned in result.


Generated on Fri Mar 17 12:45:01 2006 by  doxygen 1.3.9.1