unity-game-engineaugmented-realityarkitarcoreface

Is there a way to enable face tracking with rear (back) camera with AR Foundation/ARKit (Unity)?


I'm trying to create an AR app which uses AR Foundation face tracking. Unfortunately, face tracking seems to be supported on the front camera (selfie) only (TrueDepth, Lidar etc).

I found it that it also can track faces on a photo or screen (which is a flat picture). So, in theory, it still should be possible to use a back camera for face tracking. Is there way to workaround the front-camera-only restriction? I understand that it may be bad in terms of performance and quality, but I'd like to check how bad it is (if it's possible).


Solution

  • In theory, a possible workaround would be to extract frames captured by the rear camera and use something like OpenCV for Unity to analyze the images and detect faces.