Find branches in a skeleton?

조회 수: 23 (최근 30일)
Ronan
Ronan 2015년 9월 15일
댓글: karishma singh 2017년 8월 8일
When you make a skeleton from a binary image you can extract branch points. However I m trying to find out which branch points are connected to which. I can find the index of the branch points. So I have a skeleton with labeled branch points and I can physically view the nodes that are connected to one another but I cannot seem to generate these connections in code? eg branch point 3 is connected to branch point 5.
  댓글 수: 6
Walter Roberson
Walter Roberson 2017년 8월 6일
karishma singh: which code was it that you ran? None of the code that is posted in this Question calls Preprocess or defines a variable named the_out ?
karishma singh
karishma singh 2017년 8월 8일
Preprocess.m is just my file name. I ran the code posted by Ronan using my skeleton image.

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2015년 9월 15일
I think you'll need to get an image of just the branch points. Then an image of just the branches with the branchpoints removed. Then pick two branchpoints to test and make an image with just those two. Then put in each branch one at a time and call bwdistgeodesic() to see if they're connected by that branch.
  댓글 수: 1
Ronan
Ronan 2015년 9월 15일
I was hoping to do it without the bwdistgeodesic function because my version of matlab doesn't have that function. I was thinking of trying to traverse the skeleton path and while traversing keep checking if the skeleton pixel is one of the nodes. It would probably involve a mask for checking if adjacent pixels are the skeleton however this solution is tricky and maybe computationally expensive. also it seems like reinventing the wheel because thats how some of the bwmorph operations work. Do you know is there an open source or alternative version to bwdistgeodesic?

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by