Created
March 6, 2017 04:32
-
-
Save dmpetrov/0b7c78b0af187f4f7e49e3772e054d28 to your computer and use it in GitHub Desktop.
Perceptual image hashes difference for Lenna images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code for the blogpost https://fullstackml.com/2016/07/02/wavelet-image-hash-in-python/ | |
import PIL | |
from PIL import Image | |
import imagehash | |
lenna = PIL.Image.open(‘lenna.png’) | |
lenna1 = PIL.Image.open(‘lenna1.jpg’) | |
h = imagehash.phash(lenna) | |
h1 = imagehash.phash(lenna1) | |
h-h1 | |
# > 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment