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

Uploaded Source

Built Distribution

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

ImageHash-1.0-py2.7.egg (6.4 kB view details)

Uploaded Egg

File details

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

File metadata

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

File hashes

Hashes for ImageHash-1.0.tar.gz
Algorithm Hash digest
SHA256 7a080c7128fa64c3c81d937cb87a9cff230ad65e8de631366e0112eff68d894b
MD5 eb64f1b1e5b5fa927a15329510a9376c
BLAKE2b-256 4379c6d24c2d192b7ad30ee9adcd1617c92766d2fb4f3bf23aa6ddb7feee781e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ImageHash-1.0-py2.7.egg
Algorithm Hash digest
SHA256 f337d3bee349f54f0b809ec1d3cc7f76503cbc5d009e062c3c029d933b08f749
MD5 ffc4746b57032beb1bc950135002a950
BLAKE2b-256 bbda17f96482312c29bb94a9a413ea58b62ea23282fb4e831c866fa97d68abb3

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