public class RoughImageComparator extends java.lang.Object implements ImageComparator
Constructor and Description |
---|
RoughImageComparator(double roughness)
Creates a comparator with
roughness allowed roughness. |
Modifier and Type | Method and Description |
---|---|
boolean |
compare(java.awt.image.BufferedImage image1,
java.awt.image.BufferedImage image2)
Compares two images with allowed roughness.
|
public RoughImageComparator(double roughness)
roughness
allowed roughness.roughness
- Allowed comparision roughness.public boolean compare(java.awt.image.BufferedImage image1, java.awt.image.BufferedImage image2)
compare
in interface ImageComparator
image1
- an image to compare.image2
- an image to compare.image1.getWidth() * image1.getHeight() * roughness