How to get the skeleton via distance transformation algorithm

4 ビュー (過去 30 日間)
zq
zq 2013 年 9 月 25 日
編集済み: zq 2013 年 10 月 8 日
Now, i just wanna get the skeleton of a binary image.
At first, i get the skeleton via thinning algorithm,. But it is not an exact skeleton, as shown in the first image. The red lines are paths. The blue lines are branches. The first image:
Then, i try to use distance transform and watershed to get the skeleton.
The second image is the distance transformation result of a binary image. the blue parts stand for the zero parts. The white and gray parts stand for the result of distance transformation. And the third image is the watershed result. But i can only get the paths. All the branches have gone.
The second image:
The third image:
So, my question is how to get all the branches. How to get the skeleton via distance transformation algorithm

採用された回答

Image Analyst
Image Analyst 2013 年 9 月 25 日
I'm not sure why you say the first image is not the true skeleton. What would your desired skeleton look like? Just the red without the blue??? If so, you can use the 'spur' option of bwmorph().
  1 件のコメント
zq
zq 2013 年 9 月 25 日
編集済み: zq 2013 年 9 月 25 日
the skeleton from the bwmorph for spur and skel is not exact. the skeleton from distance transform is the accurate one. and, i wanna get the skeleton with all the branches.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by