Problem in Blob extraction using bwareafilt()

3 ビュー (過去 30 日間)
Mahi
Mahi 2018 年 4 月 10 日
コメント済み: Mahi 2018 年 4 月 12 日
Hello Everyone, I have two separate blobs in an image, which is separated by one pixel thick boundary. I tried to extract one out of them using bwareafilt( Imagedata,1). However, it did not work out- instead it gives me the same image without any error. Imagedata variable has Logical type. Even when I run regionprops() to find the centroid of each, it shows me only one centroid and considers as the connected blobs. Please find the attached file with this question (Mask.PNG). Thanking you in anticipation.

採用された回答

Image Analyst
Image Analyst 2018 年 4 月 11 日
You need to use 4-connectivity. It's using 8-connectivity and so it thinks the blobs are touching on the corners. Use 4 for the conn input to bwareafilt() and I bet it will be ok.
  1 件のコメント
Mahi
Mahi 2018 年 4 月 12 日
Thanks very much, Image Analyst.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by