'Threshold for pHash Image Similarity
I am trying find similar images using pHash comparison. pHash of an image is 64-bit number. What I am doing is comparing hashes of two images and then count the number of 1 in the resulting hash, then calculate the my result into percentage. I have tried using 50% and 70% threshold, but got many FPs for 50% threshold and many FNs for 70% threshold. Which threshold will be better? Or do i need to perform some other calculations?
Solution 1:[1]
Not sure it's still relevant for you LOL, but 80% works for me. Maybe even 78%. But that depends on the size of your image matrix. If you're using the 'default' 64-bit matrix, that should work for you. If you're using a bigger matrix, the numbers will change.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | anatolyr |