Splitting a skeleton in a binary object to equal lengths!
4 ビュー (過去 30 日間)
古いコメントを表示
Hello everyone,
I have a skeleton image obtained from running bwskel on a binary image. Here's couple of images as a sample:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/809759/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/809764/image.png)
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 件のコメント
採用された回答
Walter Roberson
2021 年 11 月 23 日
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 件のコメント
Jhe Mag
2022 年 6 月 29 日
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1050410/image.jpeg)
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!