public class ImageCompare extends Object
| Constructor and Description |
|---|
ImageCompare() |
| Modifier and Type | Method and Description |
|---|---|
static int |
calcHammingDistance(String _left,
String _right)
Calculate the hamming distance of the two given strings.
|
static int |
compareWith(IImgHash _hasher,
File _img1,
File _img2)
Calculate hashes for _img1 and _img2 using _hasher and return the hamming distance as result.
|
public static int compareWith(IImgHash _hasher, File _img1, File _img2)
_hasher - hash implemenation to use_img1 - first image_img2 - second imagepublic static int calcHammingDistance(String _left, String _right)
For further explanation about the Hamming Distance, take a look at its Wikipedia page at http://en.wikipedia.org/wiki/Hamming_distance.
_left - first checksum_right - second checksumIllegalArgumentException - if strings do not have same lengthNullPointerException - if either _left or _right string is nullCopyright © 2019. All rights reserved.