How to perform closing and filling

1 回表示 (過去 30 日間)
Mohammed Farhan
Mohammed Farhan 2014 年 3 月 2 日
回答済み: Image Analyst 2014 年 3 月 2 日
Hello, How to perform closing of an image with SE of size 10 . and then to fill small black dots of size less than 10 pixels. Please Help

採用された回答

David Young
David Young 2014 年 3 月 2 日
編集済み: David Young 2014 年 3 月 2 日
If you have the image processing toolbox, use strel, imclose and imfill.
Also look at bwareaopen. You can apply this to the complement of the image to remove holes with a certain area or less, then take the complement again.
If your image is logical, the complement is obtained using the ~ operator. If it is binary numeric with values 0 and 1, the complement is 1 minus the image.
  2 件のコメント
Mohammed Farhan
Mohammed Farhan 2014 年 3 月 2 日
yes but how to use imfill only for filling holes of area less than 10 pixels
David Young
David Young 2014 年 3 月 2 日
Editing answer.

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2014 年 3 月 2 日
I did this just recently for someone here: http://www.mathworks.com/matlabcentral/answers/119328#answer_126374. She wanted to get rid of tiny black holes in here binary image but not the bigger ones. See the post for images and code. Post an image if you want more exact advice.

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by