photo_hash_4.py 257 B

12345678
  1. def distance(image_path, other_image_path):
  2. """ Compute the hamming distance between two images"""
  3. image_hash = average_hash(image_path)
  4. other_image_hash = average_hash(other_image_path)
  5. return hash_distance(image_hash, other_image_hash)