News for hackers. Stuff that matters.
Re:A Comparison of Image Hashing Libraries by 0x09 on Monday October 27, 2014 @06:27PM (#8518539)
libpHash is actually quite slow for what it does. I spent a fair amount of time investigating image hashing algorithms a few years ago and at that time I saw 10-20x improvement over libpHash just by implementing the similar phash algorithm described in Neil K's blog.* With Puzzle being both slower and dramatically less accurate on my body of test images. Perceptual hashing can be surprisingly lightweight -- by the end of the experiment I was really just benchmarking image loading libraries. If speed is a concern you are probably better off foregoing these libs and writing the 2-3 dozen lines of code (really!) it takes to roll your own, or better yet implementing a comparable, even more lightweight algorithm like dhash.

* http://www.hackerfactor.com/blog/index.php?/archives/529-Kin...

* The main difference being that libpHash applies a gaussian blur over the image, which can be made redundant by using a decent resampling algorithm.

There are no comments on this comment yet.