Making a binary skeletonization less noisy - image processing
1 次查看(过去 30 天)
显示 更早的评论
Hi - I am trying to skeletonize a binary mask like this https://dl.dropbox.com/u/54307333/4ANDmask.bmp. But I end up with too many small branches coming off of the long segments https://dl.dropbox.com/u/54307333/4Maskthin.bmp. I want to get rid of small branches (<20 pixels) that are only connected on one end. Ones that are connected on both ends are valuable to me.
I am using bwmorph to calculate the endpoints. And using that I can exclude branches that are below a certain size, but like I said, I want to keep the ones that are connected on both ends.
I probably have to do some kind of if statement, checking the connectivity of each endpoint...? Not sure. Any ideas?
Thanks,
Nad
0 个评论
采纳的回答
Image Analyst
2012-12-7
Try blurring the image before you skeletonize it.
4 个评论
Image Analyst
2012-12-10
Just try a simple box filter on the grayscale image.
out = conv2(in, ones(21), 'same');
Then do your morphology.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!