libphash
Perceptual image hashing: a short fingerprint of an image, so that a resized copy, a recompressed JPEG or a slightly edited version lands a few bits away from the original, while an unrelated picture lands about half the bits away.
libphash — the C library
Nine algorithms (aHash, dHash, pHash, wHash, mHash, BMH, Radial, ColorHash, ColorMoments), SIMD-accelerated JPEG, PNG and WebP decoding, batch hashing. How each algorithm works, measured, and how to choose one.
python-libphash — the Python binding
The official binding of the same library: pip install python-libphash.