0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

MLKitで顔のパーツのポジションを取るには(Android)

Last updated at Posted at 2021-11-18

まず公式サイトを貼ります:

setLandmarkModeに入ります:

二択しかないのでパーツを取りたい時には以下の設定にしてください:

// 特徴を取るかどうか
.setLandmarkMode(FaceDetectorOptions.LANDMARK_MODE_ALL)

これをオンにすることで、全部の顔のパーツが読み取れるようになる。

その後

例えば左目のxポジションを取りたい時に以下のコードを

x = face.getLandmark(FaceLandmark.LEFT_EYE).getPosition().x;
// ちなみにface.getLandmark().getPosition()のリターンタイプはPointFというタイプです。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?