how can remove corner of binary image??

1 回表示 (過去 30 日間)
sara
sara 2014 年 10 月 1 日
コメント済み: sara 2014 年 10 月 8 日
how can remove corner of binary image?? foe example if we have an image like this ::
how can remove the corner of this image and get the image like this:
thanks

採用された回答

Iain
Iain 2014 年 10 月 1 日
編集済み: Iain 2014 年 10 月 1 日
If you repeatedly erode & dilate (imerode & imdilate) the image you should get close to what you want if you use the right "neighbourhoods".
You could alternatively generate ANOTHER binary image, which is 1 (true) where you want to keep it, and 0 where you want to discard it. You'll need to think about how you generate that image, but for a simple version:
other_binary_image = false(size(im));
other_binary_image(:,1:50) = true; % to keep the left 50 columns
new_image = im & other_binary_image;
You'll need to think about how you generate this "mask" to make sure it does what you want it to.
  3 件のコメント
Image Analyst
Image Analyst 2014 年 10 月 1 日
Yes, that's one way. lain is probably thinking of the method of alternating sequential filters. Here is the reference: http://www.esiee.fr/~coupriem/Pdf/cb04.pdf It looks like (from what the new perimeter looks like) the method you used was watershed.
sara
sara 2014 年 10 月 8 日
thanks Image Analyst

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by