JohannesBuchner / imagehash

A Python Perceptual Image Hashing Module
BSD 2-Clause "Simplified" License
3.14k stars 328 forks source link

hash with z-transform #179

Closed hazenne7 closed 1 year ago

hazenne7 commented 1 year ago

NOT AN ISSUE, just wondering what z-transform does to the image so it can change its hash value.

JohannesBuchner commented 1 year ago

code is here: https://github.com/JohannesBuchner/imagehash/blob/master/examples/hashimages.py#L41-L43

Maybe it is not necessary. I thought it would enhance contrast. For example, if you have bright and dark parts in an image, the hash by default would distinguish the two parts but not see patterns within. A z-transform brings the contrast closer together.

hazenne7 commented 1 year ago

Noted! Thanks for your reply, really appreciate it!