- An easy way to retrieve similar images by phash
- pip install imagehash
- pip install PIL
-
- Get the phash of images.
-
- Calculate the Hamming distance between the images.
- 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.
- The Hamming distance between two integers is the number of positions at which the corresponding bits are different