Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 801 Bytes

README.md

File metadata and controls

21 lines (16 loc) · 801 Bytes

image-similarity

  • An easy way to retrieve similar images by phash

Dependency:

  • pip install imagehash
  • pip install PIL

Program description:

    1. Get the phash of images.
    1. Calculate the Hamming distance between the images.

What is a perceptual hash?

  • A perceptual hash is a fingerprint of a multimedia file derived from various features from its content. Unlike cryptographic hash functions which rely on the avalanche effect of small changes in input leading to drastic changes in the output, perceptual hashes are "close" to one another if the features are similar.

What is the Hamming distance?

  • The Hamming distance between two integers is the number of positions at which the corresponding bits are different

Reference: