Image processing for determining endpoints on a line
显示 更早的评论
Hello,
I am looking to calculate the distance between endpoints of several skeletonized images. However, at the moment, the bwmorph function identifies endpoints in the skeletonized image that I am not interested in. My code for identifying the endpoints is below, and three examples of BW files are attached in .mat format.
imshow(BW)
BW2 = bwpropfilt(BW, 'perimeter', 1);
skel = bwskel(BW2);
imshow(skel)
[I,J]=find(bwmorph(skel,'endpoints'));
hold on
scatter(J, I)
I want to refine this code so that only the endpoints that I am interested in are identified. The endpoints that I am interested in are the ones at the true ends of the line. An image of the endpoints that are identified for BW_3 with my current code is shown below. As can be seen, far too many endpoints are found.

I have attempted to pass a minimum branch length into the bwskel function but this does not work for all of my images.
Any help with this would be appreciated.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Morphological Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
