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.
How do I remove islands in a non-binary greyscale image?
6 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Cyrus N
2017-6-27
编辑:Cyrus N
2017-6-28
1 个评论
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 Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!