KilianB / JImageHash

Perceptual image hashing library used to match similar images
MIT License
397 stars 80 forks source link

Comparing different size image #42

Closed p06code closed 4 years ago

p06code commented 4 years ago

How do we manage to utilize the ImageHashing when the image sizes are different? What would the result when we try to compare the same image of different sizes? If we can implement it, which algorithm do I need to utilize?

KilianB commented 4 years ago

The first step of the hashing algorithm resizes and grayscales the input prior to computing the actual hash, therefore different sizes should still be detected as a possible match.

e.g.

and

will match.

This is the first part of every algorithm so feel free to experiment. A good way to start are the dHash and pHash

p06code commented 4 years ago

thanks for the response, closing the issue