フィルターのクリア

Change corners from image

2 ビュー (過去 30 日間)
Iugo
Iugo 2021 年 6 月 22 日
コメント済み: Iugo 2021 年 6 月 22 日
Hello everyone!
I have this figure I'm working on, shown below, and I want to remove those upper and below left black corners or even change them from black to white, but I'm not finding any solution...
Also, since I'm dealing with different versions of this image (rotated, different sizes, I wanted to make this process as general as possible. Anyone has any idea?
Thanks!
  2 件のコメント
KSSV
KSSV 2021 年 6 月 22 日
Which black corners? The left one?
Iugo
Iugo 2021 年 6 月 22 日
@KSSV Yes, exactly!

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

採用された回答

Walter Roberson
Walter Roberson 2021 年 6 月 22 日
img = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/661015/image.png');
imshow(img);
title('original RGB')
BW = imbinarize(rgb2gray(img));
imshow(BW)
title('binary');
mask = ~bwareafilt(~BW, 1);
imshow(mask)
title('mask with cleared boundary')
  1 件のコメント
Iugo
Iugo 2021 年 6 月 22 日
Thank you so much @Walter Roberson, that's it!!

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by