When you dilate and erode a binary image of a skeleton does the skeleton keep its proportion?
Show older comments
I have subtracted a pixel off the ends of a skeleton on a binary image. To get the skeleton back to the way it originally was I was trying to use dilation and erosion using bwmorph. But I can't seem to get the skeleton back to its original way. It appears that dilation and erosion keeps proportional to the skeleton. All I want to do is add back the pixel that i took off the ends? is this possible without just adding the pixels manually.
Accepted Answer
More Answers (2)
Jon
on 18 Sep 2015
0 votes
I do this exact procedure in the context of skeletonizing rivers to find their centerlines. I have to add the ends back after running some erosions to get rid of branches. Unfortunately my algorithm is a little complicated due to the specific constraints I face. Can you provide an example (with images) so we can assist you better?
Image Analyst
on 18 Sep 2015
What happened to the original image? Why did it go missing? Anyway, let's say you cleared it for some reason, or it's no longer in scope, and all you have is an image of the endpoints alone, and an image of the skeleton with the endpoints removed. To get the endpoints back, you simply or them:
originalImage = endPointsImage | skeletonImage;
Categories
Find more on Morphological Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!