필터 지우기
필터 지우기

Count the endpoints in a image

조회 수: 3 (최근 30일)
Malini
Malini 2020년 10월 14일
댓글: Rik 2020년 10월 14일
How to count the number of endpoints as marked in this image.
I tried with bwmorph(endpoints). But my output is like this.
  댓글 수: 5
Malini
Malini 2020년 10월 14일
Sure. Will follow the documentation.
Thank you so much. I got it after the skeletonization for that image.
And I followed the same for this image which I didnt get because the skeletonized image is not continuous. How to fix that. Attached the code I used for this image.
I = imread('Onion.png');
mask = I(:,:,1)<I(:,:,2) & I(:,:,3)<I(:,:,2);
skel = bwmorph(mask,'skel',Inf);
figure,imshow(skel);
E = bwmorph(skel, 'endpoints');
Rik
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개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by