如何找到的另一个内的一个形象? [英] How to find one image inside of another?

查看:158
本文介绍了如何找到的另一个内的一个形象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个BMP图像。
ImageA是截图(例子)
ImageB就是一个子集。比方说,一个图标。

我想找到的X,Y ImageB坐标内ImageA(如果存在)。

任何想法,我会怎么做呢?


解决方案

  1. 那么,有没有在ImageA ImageB的任何变形?

  2. 如何精确的图像,如,像素对像素的他们将在相同

  3. 多少计算能力,你有这个?

如果答案前两个问题是的没有的和的的,那么你有一个简单的问题。它还有助于知道答案的 Q3

更新:

其基本思路是这样的:而不是imageB周围的每一个像素匹配一个窗口,在imageA每个像素和检查的关系,让我们找出两个图像的兴趣点(或功能),这将是的可追踪。所以它看起来像弯道真的可跟踪,因为它周围的地区是有点相似(不会进入细节) - 因此,让我们找到一些真正的强烈的两个图像的角落和搜索边角看起来最相似。

这减少了B,其中A搜寻每一个像素的问题B中,在一个1000角落寻找,比如说,500角(或类似的东西) - 更快

和的真棒事情是你在<一个在您的处置有几个这样的角落探测器 href=\"http://opencv.willowgarage.com/documentation/feature_detection.html?highlight=surf#feature-detection\">OpenCV.如果您不觉得使用 emguCV (C#varriant),然后使用的 FAST 探测器找到匹配的角落,从而找到你的图像之间的多重功能。一旦你有,你可以发现图像的左上角的位置。

I have 2 bmp images. ImageA is a screenshot (example) ImageB is a subset of that. Say for example, an icon.

I want to find the X,Y coordinates of ImageB within ImageA (if it exists).

Any idea how I would do that?

解决方案

  1. So is there any warping of ImageB in ImageA?
  2. How "exact" are the images, as in, pixel-for-pixel they will be the same?
  3. How much computational power do you have for this?

If the answers to the first two questions are No and Yes, then you have a simple problem. It also helps to know the answer to Q3.

Update:

The basic idea's this: instead of matching a window around every pixel in imageB with every pixel in imageA and checking the correlation, let's identify points of interest (or features) in both images which will be trackable. So it looks like corners are really trackable since the area around it is kinda similar (not going into details) - hence, let's find some really strong corners in both images and search for corners which look most similar.

This reduces the problem of searching every pixel in B with A to searching for, say, 500 corners in B with a 1000 corners in A (or something like that) - much faster.

And the awesome thing is you have several such corner detectors at your disposal in OpenCV. If you don't feel using emguCV (C# varriant), then use the FAST detector to find matching corners and thus locate multiple features between your images. Once you have that, you can find the location of the top-left corner of the image.

这篇关于如何找到的另一个内的一个形象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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