OpenCV进行ANDROID图像比较 [英] OpenCV for ANDROID image compare

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

问题描述

我想开发应用程序,它会使用 OpenCV的识别的物品(如纪念碑或东西)present在镜头前,然后它会显示相关信息。

I want to develop app which will recognize object(like monument or something) present in front of camera using OpenCv and then it will show information about it.

所以,问题是如何识别对象(如纪念碑或某事),形状或 OpenCV的比较图像?
什么是最好的方法,这样做呢?

So the question is how to recognize object(like monument or something) shape or compare to images with OpenCV?
And what is the best method for doing this?

如果有某种的目标检测和比较的样本或教程,这将是很好的。

It would be good if there was some kind of samples or tutorials for object detection and comparison.

感谢你。

推荐答案

你问什么是使用局部特征探测器一样的OpenCV的SIFT,SURF和ORB,例如最好的方法。

The best method for what you ask is using local features detectors like OpenCV's SIFT, SURF and ORB, for example.

您需要从您要检测的对象至少有一张照片。随后,这些算法可以比较与其他图像,图像,看看他们是否有足够的相似。

You need at least one picture from the object you want to detect. Afterwards, those algorithms can compare that image with other images to see if they are similar enough.

下面是文件作为算法。

  • 在ORB和其他人:

http://docs.opencv.org/modules/features2d/doc/feature_detection_and_description.html

  • SURF和整理(非自由):

http://docs.opencv.org/modules/nonfree/doc/ feature_detection.html

这些算法工作,该工作的方法是选择感兴趣的点,每个图像,并加以比较,看它们是否匹配。如果发现了几场比赛,这是最的可能的图像具有相同的对象。

The way these algorithms work for that task is by selecting interesting points for each image, and compare them to see if they match. If several matches are found, it is most likely the images have the same object.

教程(从特征检测及以下):

Tutorials (from Feature Detection and below):

<一个href="http://docs.opencv.org/doc/tutorials/features2d/table_of_content_features2d/table_of_content_features2d.html" rel="nofollow">http://docs.opencv.org/doc/tutorials/features2d/table_of_content_features2d/table_of_content_features2d.html

您还可以找到的 C ++样本此主题相关这里(样品也是在OpenCV的下载包):

You can also find C++ samples related to this topic here (samples are also within OpenCV download package):

  • 如。 matching_to_many_images.cpp
  • 在video_homography.cpp

http://$c$c.opencv.org/projects/opencv/repository/revisions/master/show/samples/cpp

Android的Java示例在这里(无关系,但也很有帮助):

And Android Java samples here (unrelated but also helpful):

http://$c$c.opencv.org/projects/opencv/repository/revisions/master/show/samples/android

的Python样品这实际上是更多,更新的人对这个话题(在这篇文章的撰写时间):

Or Python samples which are actually the more updated ones for this topic (at the time this post was written):

http://$c$c.opencv.org/projects/opencv/repository/revisions/master/show/samples/python2

最后一点,像@BDFun在评论说,这是不平凡的事。

As a final note, like @BDFun said in the comment, this is not trivial to do.

更多 - 如果您想OpenCV的特征检测和描述,检查这个帖子。

More - if you want an overview of OpenCV Feature detection and description, check this post.

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

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