java.lang.Object
com.github.hypfvieh.imaging.ImageCompare
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic intcalcHammingDistance(String _left, String _right) Calculate the hamming distance of the two given strings.static intcompareWith(IImgHash _hasher, File _img1, File _img2) Calculate hashes for _img1 and _img2 using _hasher and return the hamming distance as result.
-
Konstruktordetails
-
ImageCompare
public ImageCompare()
-
-
Methodendetails
-
compareWith
Calculate hashes for _img1 and _img2 using _hasher and return the hamming distance as result.- Parameter:
_hasher- hash implemenation to use_img1- first image_img2- second image- Gibt zurück:
- distance score
-
calcHammingDistance
Calculate the hamming distance of the two given strings. String must have the same length!For further explanation about the Hamming Distance, take a look at its Wikipedia page at http://en.wikipedia.org/wiki/Hamming_distance.
- Parameter:
_left- first checksum_right- second checksum- Gibt zurück:
- distance score
- Löst aus:
IllegalArgumentException- if strings do not have same lengthNullPointerException- if either _left or _right string is null
-