相似图像Hash算法OC版本 TpHash

码农软件 · 软件分类 · 图形/图像处理 · 2019-09-07 12:57:55
  • 授权协议: 未知
  • 开发语言: 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版本,在此表示感谢。

本文地址:https://www.codercto.com/soft/d/14072.html

Head First Design Patterns

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》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具