- 授权协议: 未知
- 开发语言: Objective-C
- 操作系统: OS X
软件介绍
相似图像Hash算法OC版本
本代码主要是实现了 http://www.ruanyifeng.com/blog/2011/07/principle_of_similar_image_search.html 一文记载的一种相似图像Hash的算法,具体细节请看此文。
关键函数为
+ (uint64_t)ptHash:(UIImage*)image; //生成64位的图像Hash
+ (int)hamdist:(uint64_t)x with:(uint64_t) y; //比较两个Hash值的汉明距离
这个算法有一定局限性,仅适用于一张图片的多种不同分辨率,采样率,或者极为相似的图像的比较。
实现主要参考了文中提到的Wote的Py版本,在此表示感谢。
Head First Design Patterns
Elisabeth Freeman、Eric Freeman、Bert Bates、Kathy Sierra、Elisabeth Robson / O'Reilly Media / 2004-11-1 / USD 49.99
You're not alone. At any given moment, somewhere in the world someone struggles with the same software design problems you have. You know you don't want to reinvent the wheel (or worse, a flat tire),......一起来看看 《Head First Design Patterns》 这本书的介绍吧!
