OpenCV:指纹图像并与数据库进行比较 [英] OpenCV: Fingerprint Image and Compare Against Database

查看:27
本文介绍了OpenCV:指纹图像并与数据库进行比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个图像数据库.当我拍一张新照片时,我想将它与这个数据库中的图像进行比较并获得一个相似性分数(使用 OpenCV).我想通过这种方式检测,如果我有一个图像,它是和新鲜的图很像.

I have a database of images. When I take a new picture, I want to compare it against the images in this database and receive a similarity score (using OpenCV). This way I want to detect, if I have an image, which is very similar to the fresh picture.

是否可以为我的数据库图像创建指纹/哈希并将新图像与之匹配?

Is it possible to create a fingerprint/hash of my database images and match new ones against it?

我正在寻找算法代码片段或技术演示,而不是商业解决方案.

I'm searching for a alogrithm code snippet or technical demo and not for a commercial solution.

最好,

斯蒂芬

推荐答案

正如 Pual R 所评论的,这个指纹/哈希"通常是一组特征向量或一组特征描述符.但是在计算机视觉中使用的大多数特征向量通常对于搜索数据库来说计算成本太高.所以这个任务需要一种特殊的特征描述子,因为像 SURF 和 SIFT 这样的描述子即使经过各种优化也会花费太多时间进行搜索.

As Pual R has commented, this "fingerprint/hash" is usually a set of feature vectors or a set of feature descriptors. But most of feature vectors used in computer vision are usually too computationally expensive for searching against a database. So this task need a special kind of feature descriptors because such descriptors as SURF and SIFT will take too much time for searching even with various optimizations.

OpenCV 为您的任务(对象分类)提供的唯一功能是视觉词袋 (BOW) 的实现.

The only thing that OpenCV has for your task (object categorization) is implementation of Bag of visual Words (BOW).

它可以计算特殊类型的图像特征并训练视觉词汇.接下来,您可以使用此词汇表在您的数据库中查找相似的图像并计算相似度得分.

It can compute special kind of image features and train visual words vocabulary. Next you can use this vocabulary to find similar images in your database and compute similarity score.

这里是词袋的 OpenCV 文档.此外,OpenCV 有一个名为 bagofwords_classification.cpp 的示例.它真的很大,但可能会有所帮助.

Here is OpenCV documentation for bag of words. Also OpenCV has a sample named bagofwords_classification.cpp. It is really big but might be helpful.

这篇关于OpenCV:指纹图像并与数据库进行比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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