MATLAB Answers

Translated by

このページのコンテンツは英語から自動翻訳されています。自動翻訳をオフにする場合は「<a class="turn_off_mt" href="#">ここ</a>」をクリックしてください。

Nad
0

Making a binary skeletonization less noisy - image processing

Nad
さんによって質問されました 2012 年 12 月 7 日
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 件のコメント

サインイン to comment.

1 件の回答

回答者: Image Analyst
2012 年 12 月 7 日
 採用された回答

Try blurring the image before you skeletonize it.

  4 件のコメント

Nad
2012 年 12 月 7 日
For this kind of image, what do you think is the best way to blur? Simple median filter or should I go with something else?
Nad
2012 年 12 月 8 日
tried gaussian filter (see help for fspecial if anyone is interested) with a decent sized window (15x15 for a 250x250 roi) and that got rid of the small off shooting branches. thanks!
also tried bwmorph(image,'spur',numofpixels) to get rid of branches of a certain size and that seemed to help as well.
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.

サインイン to comment.



Translated by