photo_hash_2.py 243 B

12345678
  1. def hashes_are_similar(left_hash, right_hash, tolerance=6):
  2. """
  3. Return True if the hamming distance between
  4. the image hashes are less than the given tolerance.
  5. """
  6. return hash_distance(left_hash, right_hash) <= tolerance