Count the endpoints in a image
显示 更早的评论

How to count the number of endpoints as marked in this image.
I tried with bwmorph(endpoints). But my output is like this.

5 个评论
Rik
2020-10-14
What exact code steps did you use?
Malini
2020-10-14
This time I edited your post for you. Next time, please use the tools explained on this page to make your question more readable.
If you read the documentation you see that it is meant to be run on a skeletonized image, so you need to do that first.
I= imread('Endpoints.png');
B= I(:,:,3)>128;
S= bwmorph(B,'skel');
E= bwmorph(S,'endpoints');
figure,imshow(E);
Malini
2020-10-14
Rik
2020-10-14
You could try imclose to close the gaps and smoothen your mask. Another possibility is to modify your initial mask creation.
Side note: if you want help with your specific images you will have to attach the originals.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
