lib.comparators
Class ImageComparator

java.lang.Object
  extended by lib.comparators.ImageComparator
All Implemented Interfaces:
Distanceator<java.awt.image.BufferedImage>

public class ImageComparator
extends java.lang.Object
implements Distanceator<java.awt.image.BufferedImage>

an image comparator returns the distance between two images


Constructor Summary
ImageComparator(Metric distanceMetric)
           
ImageComparator(Metric distanceMetric, double fuzz)
           
 
Method Summary
 double distance(java.awt.image.BufferedImage img1, java.awt.image.BufferedImage img2)
          Measure the distance between two images as defined by the pre-defined metric NOTE: the images must have the same size!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageComparator

public ImageComparator(Metric distanceMetric)

ImageComparator

public ImageComparator(Metric distanceMetric,
                       double fuzz)
Method Detail

distance

public double distance(java.awt.image.BufferedImage img1,
                       java.awt.image.BufferedImage img2)
Measure the distance between two images as defined by the pre-defined metric NOTE: the images must have the same size!

Specified by:
distance in interface Distanceator<java.awt.image.BufferedImage>
Parameters:
img1 - the first image to compare to
img2 - the second image to compare with
Returns:
the distance between the images
See Also:
Metric