JohannesBuchner / imagehash

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

Triangular wHash? #95

Closed DonaldTsang closed 4 years ago

DonaldTsang commented 5 years ago

There is this repo https://pippy360.github.io/transformationInvariantImageSearch/ where they dissect an image into triangles for comparisons, and it hashes each triangle. The problem is the trangles are hashed three times using pHash (roatated with different vertex) After reading these articles maybe a Triangular wHash can reduce the size of the hashes.

JohannesBuchner commented 5 years ago

Interesting. The repo you mention has MIT licensed python code. I would be happy to accept a contribution. Can you try out the transformationInvariantImageSearch code for a variety of test images of wildly different sizes, colors, etc. and check how robust the code base is?

I am a bit concerned by the number of parameter this algorithm has. First, finding the key points, then, the number of triangles to use in the ball search. I am unsure if these parameters have to be tuned for each application. The comment in the beginning of keypoints.py indicates the code needs substantially more work.

DonaldTsang commented 5 years ago

@JohannesBuchner I think this is a good proof-of-concept that needs to be built up on. It seems to use a lot of defaults in values order to make things work. Fortunately it is not tuned at all, so we are dealing with understandable magic numbers.

JohannesBuchner commented 4 years ago

I added a link to Triangular wHash in the readme. If someone has time to submit this or another implementation, please reopen.

DonaldTsang commented 4 years ago

Looking through it but can't seem to find it in the master branch... is it in somewhere else?

JohannesBuchner commented 4 years ago

Just a link to the other project in https://github.com/JohannesBuchner/imagehash#other-projects nothing else.