OpenCV / SURF如何从描述符生成图像散列/指纹/签名? [英] OpenCV / SURF How to generate a image hash / fingerprint / signature out of the descriptors?

查看:241
本文介绍了OpenCV / SURF如何从描述符生成图像散列/指纹/签名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里有一些主题对如何找到类似图片非常有帮助。



我想做的是获取图片的指纹,找到数码相机拍摄的不同照片上的相同图片。 SURF算法接缝是独立于缩放,角度和其他失真的最佳方法。



我使用OpenCV与SURF算法来提取样本中的特征图片。现在我想知道如何将所有这些特征数据(位置,拉普拉斯,大小,方向,hessian)转换成指纹或散列。



此指纹将存储在数据库和搜索查询必须能够将该指纹与具有几乎相同功能的照片的指纹进行比较。



更新: / p>

似乎没有办法将所有的描述符向量转换成一个简单的哈希。那么,将图像描述符存储到数据库中以便快速查询是最好的方式?



将词汇树作为选项吗?



我将非常感谢任何帮助。

解决方案

您提到的功能数据(position,laplacian,大小,方向,hessian)不足以达到目的(如果你想做匹配,这些实际上是描述符的相关部分)。您要查看的数据是描述符(第四个参数):



void cvExtractSURF(const CvArr * image,const CvArr * mask,CvSeq **关键点,CvSeq **描述符,CvMemStorage *存储,CvSURFParams参数)



这些是128或64(取决于参数)包含特定功能的指纹的矢量(每个图像将包含可变量的这种矢量)。
如果您获得最新版本的Opencv,它们将有一个名为find_obj.cpp的示例,该示例显示如何用于匹配



update



您可能会发现这个讨论有帮助


There are some topics here that are very helpful on how to find similar pictures.

What I want to do is to get a fingerprint of a picture and find the same picture on different photos taken by a digital camera. The SURF algorithm seams to be the best way to be independent on scaling, angle and other distortions.

I'm using OpenCV with the SURF algorithm to extract features on the sample image. Now I'm wondering how to convert all this feature data (position, laplacian, size, orientation, hessian) into a fingerprint or hash.

This fingerprint will be stored in a database and a search query must be able to compare that fingerprint with a fingerprint of a photo with almost the same features.

Update:

It seems that there is no way to convert all the descriptor vectors into a simple hash. So what would be the best way to store the image descriptors into the database for fast querying?

Would Vocabulary Trees be an option?

I would be very thankful for any help.

解决方案

The feature data you mention (position, laplacian, size, orientation, hessian) is insufficient for your purpose (these are actually the less relevant parts of the descriptor if you want to do matching). The data you want to look at are the "descriptors" (the 4th argument):

void cvExtractSURF(const CvArr* image, const CvArr* mask, CvSeq** keypoints, CvSeq** descriptors, CvMemStorage* storage, CvSURFParams params)

These are 128 or 64 (depending on params) vectors which contain the "fingerprints" of the specific feature (each image will contain a variable amount of such vectors). If you get the latest version of Opencv they have a sample named find_obj.cpp which shows you how it is used for matching

update:

you might find this discussion helpful

这篇关于OpenCV / SURF如何从描述符生成图像散列/指纹/签名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆