Klasse ImageCompare

java.lang.Object
com.github.hypfvieh.imaging.ImageCompare

public class ImageCompare extends Object
  • Konstruktordetails

    • ImageCompare

      public ImageCompare()
  • Methodendetails

    • compareWith

      public static int compareWith(IImgHash _hasher, File _img1, File _img2)
      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

      public static int calcHammingDistance(String _left, String _right)
      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 length
      NullPointerException - if either _left or _right string is null