image hashing

Solutions on MaxInterview for image hashing by the best coders in the world

showing results for - "image hashing"
Melina
19 Mar 2019
1>>> from PIL import Image
2>>> import imagehash
3>>> hash = imagehash.average_hash(Image.open('test.png'))
4>>> print(hash)
5d879f8f89b1bbf
6>>> otherhash = imagehash.average_hash(Image.open('other.bmp'))
7>>> print(otherhash)
8ffff3720200ffff
9>>> print(hash == otherhash)
10False
11>>> print(hash - otherhash)
1236
13