MATLAB Answers

Alternative to using bwmorph(I,​'branchpoi​nts') to find skeleton intersections

16 views (last 30 days)
Ryan
Ryan on 6 Jun 2012
I am working on trying to identify fiber intersections using the fiber network's skeleton. I am trying to improve the accuracy of the calculation of the intersections. For most of the image the branchpoints method is efficient, however some portions read two branchpoints where it is really one fiber intersection. For example:
The two magenta pixels correspond to calculated intersections using branchpoints (gives 2 intersections), however ideally that would be recorded as a single branch point in the location between the two pixels.
I have considered doing a dilation of the branchpoints and then finding the centroids to eliminate branchpoints that are close together, but was wondering if there is a better method?

  0 Comments

Sign in to comment.

Answers (2)

Image Analyst
Image Analyst on 6 Jun 2012
You could just use find() to find locations of the branchpoints, then calculate distances between all of them. If you find a pair that is closer together than you want, you can pick the one you want and erase the one you don't want.

  1 Comment

Ryan
Ryan on 7 Jun 2012
Which method do you think would be faster?
Also, I am using the branch points to separate the skeleton into segments by subtraction in order to determine the orientation of each segments, so positioning does matter (although I do dilate the banchpoints before subtraction to eliminate any remaining 8-connectivity).

Sign in to comment.


Chaofeng Wang
Chaofeng Wang on 5 Jul 2012
Yes, Image Analyst's proposal is proper. The two spurious branch points are always 2 pixel away, and you could do a post-processing by replacing the two spurious ones with the pixel just between them. In order to do separation, you can just simply delete all these three points.

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!