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에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!