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)

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

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.3.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ImageHash-0.3-py2.7.egg (5.7 kB view details)

Uploaded Egg

File details

Details for the file ImageHash-0.3.tar.gz.

File metadata

  • Download URL: ImageHash-0.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ImageHash-0.3.tar.gz
Algorithm Hash digest
SHA256 70ab78a6f7b3ae0fab816f9c86a8e9d7ac6d8350b3a84bdd0c68cdf60a76dab7
MD5 5544dbdd8c79b06bdc9e7dacbfe3ac3f
BLAKE2b-256 ecd98f1eac7981a9d0b93d514e3bcaf127f501dea31f5e8f485fe318e3a3af80

See more details on using hashes here.

File details

Details for the file ImageHash-0.3-py2.7.egg.

File metadata

  • Download URL: ImageHash-0.3-py2.7.egg
  • Upload date:
  • Size: 5.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ImageHash-0.3-py2.7.egg
Algorithm Hash digest
SHA256 22d6ba201149fcb5876197cc1b38d68735401cfbdb6d4dc8833154a63481138c
MD5 4714f8e7c0b569e460a805b8176c58b2
BLAKE2b-256 a12befaa9b600967bfe52bb2f66ebe20b73cac2151bc33898ffbcd4a73422369

See more details on using hashes here.

Supported by

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