필터 지우기
필터 지우기

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