フィルターのクリア

Alternate Methods for Detecting Blobs in a Binary Image

3 ビュー (過去 30 日間)
Jacob Mevorach
Jacob Mevorach 2017 年 5 月 8 日
コメント済み: Jacob Mevorach 2017 年 5 月 9 日
For a project I've been working on I've been detecting blobs in a binary image. Unfortunately because I've been doing this tens of thousands of times times every time I run my script I've been trying to find a way to speed things up. Does anyone know of a way I can detect blobs in a binary image aside from using the blob analyzer function?
Currently I've been detecting blobs by using the blob analyzer and calling. [centroids, bboxes]=step(h,bw); But I'd like to speed up the process.
I'm preferably looking for a method whereby I'd be able to rewrite things to work with parfor or preferably with calculations on the GPU.
If anyone had any advice or guidance in this regard I'd greatly appreciate it.
  1 件のコメント
Jacob Mevorach
Jacob Mevorach 2017 年 5 月 9 日
Found a solution using regionprops(). Simply feed it a black and white image in the following manner to achieve the desired result.
%like this
props = regionprops(mask,'centroid','BoundingBox');
centroids = int32(cat(1, props.Centroid));
bboxes = int32(cat(1, props.BoundingBox));

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Image Processing Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by