How to get centroid specific part of an image
Mostra commenti meno recenti
I am intended to compute centroid of a part of image. I am getting centroid of all parts of the image which makes me confused of selecting the right one. my code is:
I = imread('Murine_Tibia_Crosssection.png')
Ibw = im2bw(I);
Ibw = imfill(Ibw,'holes');
Ilabel = bwlabel(Ibw);
stat = regionprops(Ilabel,'centroid');
imshow(I); hold on;
for x = 1: numel(stat)
plot(stat(x).Centroid(1),stat(x).Centroid(2),'ro');
end
please help me to get the right one.
Risposta accettata
Più risposte (2)
Image Analyst
il 10 Mar 2015
0 voti
My Image Segmentation Tutorial shows you how to get centroids.
Ajay Goyal
il 11 Mar 2015
0 voti
Categorie
Scopri di più su Statistics and Machine Learning Toolbox in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
