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

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

问题描述

这里有一些主题对如何找到相似的图片非常有帮助.

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

我想要做的是获取一张图片的指纹,并在数码相机拍摄的不同照片上找到相同的图片.SURF 算法似乎是独立于缩放、角度和其他扭曲的最佳方法.

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.

我使用 OpenCV 和 SURF 算法来提取样本图像上的特征.现在我想知道如何将所有这些特征数据(位置、拉普拉斯算子、大小、方向、粗麻布)转换为指纹或哈希.

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.

更新:

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

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?

词汇树是一种选择吗?

我将非常感谢您的帮助.

I would be very thankful for any help.

推荐答案

您提到的特征数据(位置、拉普拉斯算子、大小、方向、粗麻布)不足以满足您的目的(这些实际上是描述符中不太相关的部分,如果你想做匹配).您要查看的数据是描述符"(第 4 个参数):

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** 描述符、CvMemStorage* 存储、CvSURFParams 参数)

这些是 128 或 64 个(取决于参数)向量,它们包含特定特征的指纹"(每个图像将包含可变数量的此类向量).如果您获得最新版本的 Opencv,他们有一个名为 find_obj.cpp 的示例,它向您展示了如何使用它进行匹配

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

更新:

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

you might find this discussion helpful

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

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