模式匹配-在第二张图片中找到参考对象[OpenCV?] [英] Pattern Matching - Find reference object in second image [OpenCV?]

查看:118
本文介绍了模式匹配-在第二张图片中找到参考对象[OpenCV?]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含参考对象(例如硬币)的参考黑白图像.该对象由用户标记,即感兴趣的区域.

I have a reference b/w image that contains a reference object (a coin for example). The object is marked by the user, that is the region of interest.

现在,我想分析其他图像,并找到该对象或类似对象的位置和旋转.该物体可随意放置在相机下方,但不会缩放,视角始终为90度.

Now I want to analyze other images and find the position and rotation of that object or similar objects. The object is arbitrarily placed under the camera, but is never scaled and the viewing angle is always 90 degrees.

我已经评估了一个完全可以满足我需求的商业库: Euresys EasyFind

I have evaluated a commercial library that does exactly what I want: Euresys EasyFind

在下面,您可以找到当前任务的示例图像.当前的实现使用OpenCV的功能检测,并且不能完美运行.

Below you can find example images of the task at hand. The current implementation uses Feature Detection of OpenCV and is not working flawlessly.

模板:

找到与同一枚硬币匹配的东西:

A match is found for the very same coin:

对于略有不同的硬币,匹配失败:

The match fails for slightly different coins:

特征检测似乎是错误的方法.我只需要以某种方式简单地处理对象.但是,如果我这样做(Blur,Canny,CornerHarris),功能检测将根本无法进行.

The feature detection seems to be the wrong approach. I need to simply the object somehow. But if I do that (Blur, Canny, CornerHarris) feature detection does not work at all.

任何关于可靠方法的建议都将受到赞赏.另一种替代性的图书馆建议也将是很好的.

Any advice for a solid approach is much appreciated. An alternative libary suggestion would be great as well.

推荐答案

由于您已经尝试了许多可能的技术,因此,我要求您通过以下链接(也许您已经通过了!!!)

Since you have tried quite a number of possible techniques, I would request you to go through the following links (may be you might have gone through!!!)

  1. 所有特征检测器和描述符的比较
  2. 组合冲浪,怪胎和轻快
  1. comparision of all feature detectors and descriptors
  2. combination of surf,FREAK and brisk

失败的第三张图像对比度很低,要与其余两个图像完美匹配一点都不容易...所以我进行了对比度调整,并使用Orb Feature Detector和Orb Descriptor Extractor获得了以下匹配结果.在特征检测之前对所有图像进行对比度调整.

your 3rd image which fails is having low contrast and it is little tricky to match perfectly with the rest two...So I did a contrast adjustment and I get the following match with Orb Feature detector and Orb Descriptor Extractor..I applied contrast adjustment to all the images before feature detection.

具有图像3的图像1

具有图像3的图像2

具有图像2的图像1(此组合对所有检测器/提取器对都有效)

为了匹配,我使用了BruteForceMatcher<Hamming> matcher 尽管这些点是局部方向,但可以很好地猜测.人们需要使用不止一种技术,然后首先进行一些圆检测,以将特征检测限制为尽可能小的ROI.加上检测到的点相对于圆心的方向,可以轻松获得新的方向信息.关于第一个链接和第二个链接,您可以注意到SURF和Brief完全抵抗光强度的变化和模糊.因此,您也可以尝试将SURF和Brief结合使用.

For matching I have used BruteForceMatcher<Hamming> matcher Although the points are localised orientation can be quite nicely guessed. One needs to use more then one technique and do some circle detection first to limit the feature detection to as minimum ROI as possible. Plus orientation of the detected points with respect to the centre of the circle gives the new orientation info easily. With reference to the 1st link and 2nd link you can notice SURF and BRIEF are quite resistant to change in intensity of light and blurring. So a combination of SURF and BRIEF is what you can also try.

这篇关于模式匹配-在第二张图片中找到参考对象[OpenCV?]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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