using the ulterode function on multiple points

I am working with an image with a few small regions and i need to erode each region down to a single pixel.
When i use the ulterode function it erodes my image down to a single point,(from whichever of the original regions was the biggest).
I was just wondering if there is a modified version of this function that would allow it to output an image with multiple center pixels.
Thank you for any help
-Eric

1 个评论

Hi Eric,
If you make some matrix with two regions
>> I = false(7,6); I(2:3,2) = true; I(4:6,4) = true; I(5,3:5)= true
I =
0 0 0 0 0 0
0 1 0 0 0 0
0 1 0 0 0 0
0 0 0 1 0 0
0 0 1 1 1 0
0 0 0 1 0 0
0 0 0 0 0 0
Then you run bwulterode()...
>> bwulterode(I)
ans =
0 0 0 0 0 0
0 1 0 0 0 0
0 1 0 0 0 0
0 0 0 0 0 0
0 0 0 1 0 0
0 0 0 0 0 0
0 0 0 0 0 0
You end up with separate small regions as above. This seems to be working exactly as it's meant to. Can you produce an example that shows the phenomena you're talking about? And finally where you want to minimize it to a single pixel per separate region, what would you like to do with the small 2-pixel region at the top-left?

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Convert Image Type 的更多信息

提问:

2013-7-31

Community Treasure Hunt

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

Start Hunting!

Translated by