Hello everyone. I would be very grateful if anyone can help to see if there is any problem with the centroid extracted by this program.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Wesley
le 17 Déc 2020
Réponse apportée : Rishabh Mishra
le 21 Déc 2020
BW = imread('k.png');
s = regionprops(BW,'centroid');
centroids = cat(1,s.Centroid);
imshow(BW)
hold on
plot(centroids(:,1),centroids(:,2),'b*')
0 commentaires
Réponse acceptée
Rishabh Mishra
le 21 Déc 2020
Hi,
I have tried reproducing the issue on my end. I would state that you are following the correct method to extract the centroid of the given figure. The centroid coordinate so obtained is the mean of coordinates of all the contour points in the given image. I am attaching the image of the figure along with its centroid.
Hope this helps.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Contour Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!