How to reduce perimeter of Image in Matlab?

11 ビュー (過去 30 日間)
Harry Andrews
Harry Andrews 2018 年 9 月 3 日
コメント済み: Harry Andrews 2018 年 9 月 3 日
Hi,
I want to erode (Reduce the perimeter) of the below image by 7 pixels such that only the image within the red circle is kept.
I thought this could be done with imerode, but this also reduces the central pixels which I do not want!
Thank You :)

採用された回答

Image Analyst
Image Analyst 2018 年 9 月 3 日
Try this:
se = strel('disk', 7, 0);
binaryImage = grayImage > 0; % Threshold.
mask = imerode(binaryImage, se);
grayImage(~mask) = 0;
  1 件のコメント
Harry Andrews
Harry Andrews 2018 年 9 月 3 日
Amazing, thank you!!!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Segmentation and Analysis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by