Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.09k stars 1.16k forks source link

The front camera can't open in 2D and 3D human body tracking samples #861

Closed stevenbajer closed 3 years ago

stevenbajer commented 3 years ago

In humanbody tracking 2D and 3D samples of ARFoundation, I found that camera do not switch to User direction when I switch the facing direction of AR camera Manager from World to User. These two samples always used the rear camera . Could you have other ways to switch rear camera to front camera ? Thanks!

stevenbajer commented 3 years ago

I readed the apple arkit document and find only the rear camera support this feature.....

stevenbajer commented 3 years ago

The ARKit also support a feature that can detecting Human Body poses in Images through VNDetectHumanBodyPoseRequest, an image-based request type that detects key body points. If ARFoundation support this feature, I can using front camera to detect the 2D human body pose. If not support now, could you give me some advice how to add this feature or when ARFoundation support this feature ? Thanks a lot!

DavidMohrhardt commented 3 years ago

You would need to acquire the camera background texture to feed into VNDetectHumanBodyPoseRequest. You can do this by acquiring the CPU Camera Image to get the raw pixel buffer and then feed that into the API.