How can I measure the centroid of the object of an image and how to measure the distance from the centroid?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Evelynn Tan
il 7 Ott 2018
Commentato: Image Analyst
il 31 Ott 2018
I need to measure the centre point of a lip image and measure the distance from the centroid to some point (left side, right side, up and down) of the lip. Must I convert the image to gray image first or can I convert it into YCbCr colour space?
0 Commenti
Risposta accettata
Image Analyst
il 7 Ott 2018
Try the color thresholder on the apps tab of the tool ribbon to get a mask. Then call regionprops on the mask to get the centroid. Then use sqrt() to get distances from the centroid to other locations you're interested in.
Più risposte (1)
Evelynn Tan
il 31 Ott 2018
Modificato: Evelynn Tan
il 31 Ott 2018
1 Commento
Image Analyst
il 31 Ott 2018
Only you can say whether the mask is acceptable to the remainder of your algorithm.
To find distance, use sqrt(). To find centroids, use regionprops(). To get rid of small blobs, use bwareafilt().
Vedere anche
Categorie
Scopri di più su Image Segmentation and Analysis in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!