简单的多二进制检测二进制图像? [英] Simple Multi-Blob Detection of a Binary Image?
问题描述
如果存在图像的给定2d阵列,其中阈值已经完成,现在是二进制信息。
If there is a given 2d array of an image, where threshold has been done and now is in binary information.
是否有任何特定的方法来处理此图片,以获取图片上的多个blob坐标?
Is there any particular way to process this image to that I get multiple blob's coordinates on the image?
我不能使用openCV,因为这个过程需要在C上的自定义模拟器上同时运行10个模拟机器人。
I can't use openCV because this process needs to run simultaneously on 10+ simulated robots on a custom simulator in C.
我需要blob的xy坐标,但首先我需要首先找到那些多个blob。
I need the blobs xy coordinates, but first I need to find those multiple blobs first.
像素组大小的最简单的标准应该足够了。但我没有任何线索如何开始编码。
Simplest criteria of pixel group size should be enough. But I don't have any clue how to start the coding.
PS:单一blob应该没问题。问题是多个blob。
PS: Single blob should be no problem. Problem is multiple blobs.
只是一个开始?
推荐答案
查看 QuickBlob ,它是一个非常适合您需要的小型独立C库。
Have a look at QuickBlob which is a small, standalone C library that sounds perfectly suited for your needs.
QuickBlob附带一个小命令行工具c $ c> csv-blobs ),它输出在输入图像中发现的每个blob的位置和大小:
QuickBlob comes with a small command-line tool (csv-blobs
) that outputs the position and size of each blob found within the input image:
./csv-blobs white image.png
X,Y,size,color
28.37,10.90,41,white
51.64,10.36,42,white
...
下面是一个例子(输出图片是由于 show -blobs.py
QuickBlob附带的微小的Python实用程序):
Here's an example (output image is produced thanks to the show-blobs.py
tiny Python utility that comes with QuickBlob):
这篇关于简单的多二进制检测二进制图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!