Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.03k stars 1.13k forks source link

Face tracking on the front camera with world tracking configuration on iOS #708

Closed robco5 closed 3 years ago

robco5 commented 3 years ago

Hi, I am getting strange values of face and eyes position when using face tracking with world tracking configuration. Here are some sampled (raw world) positions and eulers for a configuration I am getting from a system, where the user looks on a device (iPhone 12 Pro Max) in landscape orientation. Top one is with user positioned to the left screen edge, bottom one for right screen edge.

Left screen edge: head_left_side_detail

Right screen edge: head_right_side_detail

What confuses me is that the face is closer to the device than eyes, while afaik face anchor should be behind eyes. On top of it eye seems flipped...right eye is more to the left than the left one...

Unity 2020.1.8f1, ARFoundation 4.1.1

Am I missing something here?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

robco5 commented 3 years ago

Hi, please let me know in case I need to provide further info. Thank you!

tdmowrer commented 3 years ago

This is an artifact of the way ARKit reports eye transforms (you can reproduce the same behavior using their Swift example).

If you imagine the face displayed on screen isn't yours, but is that of a virtual head looking back at you, then it is that head's left and right eyes (but your right and left eyes, respectively). In other words, if you look into a mirror and point to your left eye, you will see the equivalent of facing someone who is pointing at their right eye.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.