Image Hashing library
Project description
A image hashing library written in Python. ImageHash supports:
average hashing (aHash)
perception hashing (pHash)
difference hashing (dHash)
wavelet hashing (wHash)
Requirements
Based on PIL/Pillow Image, numpy and scipy.fftpack (for pHash) Easy installation through pypi.
Basic usage
>>> from PIL import Image
>>> import imagehash
>>> hash = imagehash.average_hash(Image.open('test.png'))
>>> print(hash)
d879f8f89b1bbf
>>> otherhash = imagehash.average_hash(Image.open('other.bmp'))
>>> print(otherhash)
ffff3720200ffff
>>> print(hash == otherhash)
False
>>> print(hash - otherhash)
36
The demo script find_similar_images illustrates how to find similar images in a directory.
Source hosted at github: https://github.com/JohannesBuchner/imagehash
Changelog
- 3.0: dhash had a bug: It computed pixel differences vertically, not horizontally.
I modified it to follow dHash. The old function is available as dhash_vertical.
2.0: added whash
1.0: initial ahash, dhash, phash implementations.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ImageHash-3.0.tar.gz.
File metadata
- Download URL: ImageHash-3.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31d8474ffa3201279f758cef7db24eeef1b488b54b4f4be6a2d6b74a233716b4
|
|
| MD5 |
e509d748cb6f0b27a056ef903de01b0e
|
|
| BLAKE2b-256 |
c8d047d1ce7350ece1ff759c5d399392172435391da1ab1008a77c533f59e7e0
|
File details
Details for the file ImageHash-3.0-py2.7.egg.
File metadata
- Download URL: ImageHash-3.0-py2.7.egg
- Upload date:
- Size: 8.3 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d1da87a214593b754d0fbaf3a0ce726a569c2e8a78dcbd62c4f23f0329ed608
|
|
| MD5 |
eb95068adbcb5db55b47a57066f192bf
|
|
| BLAKE2b-256 |
deab64dbe89ea9975f6707501983b921cd014d6f88c3afa762cc04913572f7c3
|