Main Page   Modules   Compound List   File List   Compound Members   File Members  

image_compare.h File Reference

#include <gandalf/image/image_defs.h>

Go to the source code of this file.

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.


Detailed Description

Module: Extract/fill selected channel(s) of image

Part of: Gandalf Library

Revision: Last edited: Author:

Copyright: (c) 2000 Imagineer Software Limited


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 Mon Oct 13 16:14:41 2003 by doxygen1.3-rc1