查找单色位图对象的边界矩形 [英] Find bounding rectangle of objects in monochrome bitmaps

查看:172
本文介绍了查找单色位图对象的边界矩形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于单色位图:


000000000000000000000000000000000000000
001000100000000000000000000000000000000
000101000000000000000000000000000000000
000010000000001000000000000000000000000
000101000000010100000000000000000000000
001000100000100010000000000000000000000
000000000000010100000000000000000000000
000000000000001000000000000000000000000
000000000000000000000000000000000000000
000000000000001111110000000000000000000
000000000000001000010000000000000000000
000000000000001000010000000000000000000
000000000000001111110000000000000000000
000000000000000000000000000000000000000
000000000000000000000000000000000000000
000000000000000000000000000000000000000

我希望能够找到对位图的每个对象的边界矩形。

I want to be able to find the bounding rectangle of each object on the bitmap.

有没有我可以使用任何既定的算法?

Are there any established algorithms that I can use?

推荐答案

您要寻找的被称为斑点的检测,其检测从它们的周围区域中脱颖而出的对象组。根据你需要,你还可以跟踪区,凸性,周长,包围盒等斑点在很多机器视觉和检测应用中使用的复杂性。

What you're looking for is called "Blob" detection, which detects groups of objects that stand out from their surrounding area. Depending on the complexity you need you can also track area, convexity, perimeter, bounding-box, etc. Blobs are used in lots of machine vision and inspection applications.

有很多关于Wiki以及建立算法等。

There are plenty of established algorithms on Wiki and the like.

还有图像处理库,你可以看看,一个想到的就是所谓AForge - 这是用C#编写的开源库:的 aforge.net

There are also image processing libraries that you can look into, one that comes to mind is called AForge -- it's an open source library written in C#: aforge.net

否则只是搜索一滴检测,你会发现你所需要的吨的信息。

Or else just search for "Blob detection" and you'll find tons of info on what you need.

祝你好运!

这篇关于查找单色位图对象的边界矩形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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