Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How can I extract and highlight the white portion of an image?

조회 수: 2 (최근 30일)
Asher Zaidi
Asher Zaidi 2018년 6월 21일
마감: Asher Zaidi 2018년 6월 21일
How can I extract the white portion of an image (see attached), or delete the black portion so that I have only the holes in the original image left? Also, how can I fill them in so I am able to see them?

답변 (1개)

Mark Saad
Mark Saad 2018년 6월 21일
편집: Mark Saad 2018년 6월 21일
You can try this link: https://www.mathworks.com/discovery/edge-detection.html
and this video: https://www.mathworks.com/videos/edge-detection-with-matlab-119353.html
Or since your image is purely black and white, you can try this:
img = imread('yourimage.png');
subplot(1,2,1);
imshow(img);
img = imcomplement(img);
subplot(1,2,2);
imshow(img)
  댓글 수: 1
Asher Zaidi
Asher Zaidi 2018년 6월 21일
편집: Asher Zaidi 2018년 6월 21일
I'm sorry my question was unclear. I was hoping to select the white foreground of the image so that I can delete the background I wanted to overlay it on top of the original image.

이 질문은 마감되었습니다.

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by