一个图像中查找子图像 [英] Finding Sub-Images in a image

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

问题描述

我有一个相当简单的情况。我只是不知道任何特定的条件来搜索。
我有一个单一的形象,这种形象在我有遵循一个基本格局其他几个图像。
他们是矩形,并可能将有里程碑意义的形象立足的东西掉。
的一个重要组成部分,是我需要检测旋转/ MIS缩放子图像。

I have a fairly simple situation. I just don't know any specific terms to search for. I have a single image, in that image I have several other images that follow a basic pattern. They are rectangles and will possibly have landmark image to base things off of. An important part, is that I need to detect rotated/mis-scaled sub-images.

基本上我需要能够做的就是从一个单一的形象分裂名片变成正确对齐单个图像。

Basically what I need to be able to do is split 'business cards' from a single image into properly aligned single images.

请原谅我的坏油漆技能!
http://yfrog.com/eaproblemjj 正如我也设计到扫描我的卡放在任何符号或东西,这将使检测容易(正如我所说的具有里程碑意义的)

Please excuse my bad paint skills! http://yfrog.com/eaproblemjj As I am also designing the cards to be scanned I can put in whatever symbol or something that would make detection easier (as I said a landmark)

推荐答案

如果您的例子是代表(其中我怀疑由于某种原因),那么Hough变换是你的朋友(谷歌,也有很多的解释和代码的周围)。有了它,你就可以检测出矩形。

If your example is representative (which I doubt for some reason) then Hough transform is your friend (google it, there are plenty of explanations and code around). With it you'll be able to detect the rectangles.

霍夫的一些例子变换在C#是的 http://www.koders.com/csharp/fid3A88BC1FF95FCA9D6A182698263A40EE7883CF26.aspx 和的 http://www.shedletsky.com/hough/index.html

Some examples of Hough transform in C# are http://www.koders.com/csharp/fid3A88BC1FF95FCA9D6A182698263A40EE7883CF26.aspx and http://www.shedletsky.com/hough/index.html

如果实际发生的事情是,你扫描有些卡,和你有过过程中的一些控制,那么我建议你保证有卡之间没有重叠,并提供一个对比的背景(东西从卡非常不同)。那么任何边缘检测将让你足够接近你在你的例子已经开什么,之后您可以使用Hough变换。

If what actually happens is that you scan some cards, and you have some control over the process, then I'd suggest that you ensure there is no overlap between cards, and provide a contrasting background (something very different from the cards). Then any edge-detection will get you close enough to what you've drawn in your example, and after that you can use Hough transform.

另外,您也可以实现纸 http://citeseerx.ist.psu.edu/viewdoc/总结?DOI =它使用Hough变换直接检测矩形,无边缘检测10.1.1.59.4239

Alternatively, you can implement the paper http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.59.4239 which uses Hough transform to detect rectangles directly, without edge detection.

如果我没有理解你的问题,或你需要澄清,请进一步编辑你的问题,并张贴在这个答案的注释。

If I did not understand your problem, or you need clarifications, please edit your question further and post a comment on this answer.

这篇关于一个图像中查找子图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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