androidandroid-cameraxgoogle-mlkitpose-detection

Head 3d rotation and position with MLKit PoseDetection


I'm using the Pose Detection, and I tried to use the facial landmarks to calculate the 3d head position and rotation. But as said in MLKit's PoseDetection documentation, the z position for the face landmarks should be ignored.

So I would like to know if there is another way to obtain the head rotation and position from the data that the Pose Detection gives us.


Solution

  • Head rotation is not available in the Pose detection feature today, but you can get the head rotation info from ML Kit face detection APIs. See https://developers.google.com/android/reference/com/google/mlkit/vision/face/Face#public-method-summary, which provides HeadEulerAngleX/Y/Z()