Centroid of thin-edged (One Pixel thickness) connected blobs

조회 수: 3 (최근 30일)
Mahi
Mahi 2018년 3월 30일
댓글: Mahi 2018년 3월 30일
Hello Everyone, With regionprops() we can find centroid of any blob, but if this is the question with thin edged (One Pixel thickness) mask then how to proceed further? I want to find the separate Centroid of both of the blob. Each of them share only one-pixel thick boundary which is common. Please find the image attached with this question. Thanking you in anticipation.

채택된 답변

Ahmet Cecen
Ahmet Cecen 2018년 3월 30일
편집: Ahmet Cecen 2018년 3월 30일
regionprops(bwconncomp((imfill(A,'holes')-A),4),'centroid')
1) Fill the holes/"blobs" in the image.
2) Subtract the boundaries from the filled image to obtain 2 disconnected blobs (4 way connectivity due to pixelization).
3) Find individual blobs.
4) Find their centroid.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by