Splitting a skeleton in a binary object to equal lengths!
4 views (last 30 days)
Show older comments
Farshad Bolouri
on 22 Nov 2021
Commented: Jhe Mag
on 29 Jun 2022
Hello everyone,
I have a skeleton image obtained from running bwskel on a binary image. Here's couple of images as a sample:
I want find to specific number of points (for example 10 points) on these skeletons with equal distances from each other. Basically like splitting the skeleton to 10 equal parts.
I tried using bwconncomp to find the connected components in the the image and their pixel locations. But the locations are not in an order that I could use to split these to equal distances.
I would appreciate any kinds of suggestions!
Thank You
0 Comments
Accepted Answer
Walter Roberson
on 23 Nov 2021
See https://www.mathworks.com/matlabcentral/fileexchange/34874-interparc "A common request is to interpolate a set of points at fixed distances along some curve in space (2 or more dimensions.) The user typically has a set of points along a curve, some of which are closely spaced, others not so close, and they wish to create a new set which is uniformly spaced along the same curve."
7 Comments
Jhe Mag
on 29 Jun 2022
I tried to run your code in the recent comment but it gives me error such as:
Index in position 1 exceeds array bounds (must not exceed 3).
y = trace(1:skel_L,1);
Hoping for help
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!