How do I remove islands in a non-binary greyscale image?

조회 수: 6 (최근 30일)
Cyrus N
Cyrus N 2017년 6월 27일
편집: Cyrus N 2017년 6월 28일
I understand that bwareaopen() serves as a similar function however using the command yields a binary image when I need to retain the original intensity range.

채택된 답변

Cyrus N
Cyrus N 2017년 6월 27일
편집: Cyrus N 2017년 6월 28일
the trick is to use the bwareaopen() which actually removes the islands then use the binary image to cut out the original islands using OrigionalImageName(~BinaryImageName) = 0;. This uses the island free binary image to cut the islands out of the greyscale original image.
  댓글 수: 1
Image Analyst
Image Analyst 2017년 6월 27일
I've never heard of "bwarefunction()" - it's not built into the Image Processing Toolbox.
To remove "islands" I'd first get the binary image of the islands somehow, for example by thresholding, then I'd call regionfill() to smear the surrounding values in to replace the islands with gray levels.
Also, we don't know if your islands are brighter or darker than the surround because you forgot to attach an image.
I'm not sure of your definition of removing islands, but it looks like it replaces them with zeros. Not sure why that is called a removal.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by