【问题标题】:Count number of Blobs计算 Blob 的数量
【发布时间】:2014-02-05 12:52:37
【问题描述】:

我正在使用 Aforge C# 进行图像处理。如何计算图像中的 blob 数量(黑色 blackbround 上的白色 blob)。图像有一个圆形的白色斑点(图像已经是二进制格式)。任何想法将不胜感激。

【问题讨论】:

  • 如果您手动执行此操作,则需要定位所有白色像素,然后您需要按距离对它们进行分组。因此,每个接触到另一个像素的白色像素都应该被视为一个 blob 的一部分。

标签: c# aforge


【解决方案1】:

如果您仍在寻找答案,请尝试:

BlobCounterBase bc = new BlobCounter();
bc.FilterBlobs = true;
bc.MinWidth = N; //give required value or ignore
bc.MinHeight = M; //give required value  or ignore
bc.CoupledSizeFiltering = true; // if value are given and if you want both Width and Height to be applied as a constraint to identify blob, set it to true
bc.ProcessImage(image);
Blob[] blobs = bc.GetObjectsInformation();

blobs.Count 将为您提供 blob 的计数。

【讨论】:

    猜你喜欢
    • 2012-07-20
    • 2012-08-01
    • 2013-03-03
    • 2013-09-02
    • 2012-05-25
    • 1970-01-01
    • 1970-01-01
    • 2012-07-04
    • 1970-01-01
    相关资源
    最近更新 更多