Skip to main content

Image Hashing library

Project description


A image hashing library written in Python. ImageHash supports:

* average hashing (`aHash`_)
* perception hashing (`pHash`_)
* difference hashing (`dHash`_)

Based on PIL Image, numpy and scipy.fftpack (for pHash)

Basic usage

>>> import Image
>>> import ImageHash
>>> hash = ImageHash.average_hash('test.png'))
>>> print hash
>>> otherhash = ImageHash.average_hash('other.bmp'))
>>> print otherhash
>>> print hash == otherhash
>>> print hash - otherhash

Demo script find_similar_images illustrates how to find similar images in a directory.

Source repository:

.. _pHash:
.. _dHash:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ImageHash-0.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page