フィルターのクリア

How can I measure the centroid of the object of an image and how to measure the distance from the centroid?

1 回表示 (過去 30 日間)
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?

採用された回答

Image Analyst
Image Analyst 2018 年 10 月 7 日
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.

その他の回答 (1 件)

Evelynn Tan
Evelynn Tan 2018 年 10 月 31 日
編集済み: Evelynn Tan 2018 年 10 月 31 日
I could not get a nice mask when I was trying on a lip image that I've cropped from a real person's photo. Is mask like this acceptable? And I'm still can not managed to get the distance from the centroid.
  1 件のコメント
Image Analyst
Image Analyst 2018 年 10 月 31 日
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().

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by