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

Sven
Sven 2013년 7월 31일
편집: Sven 2013년 7월 31일
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