I am trying to create a mobile webapp that evaluates the distance between the user camera and a Mediapipe pose result. The bigger ambition behind this being to create a powerful tool for AR on the web only based on free ressources
The Mediapipe Pose outputs get me access to the pose representation in pixel and world coordinates (meters), but the world origin is at the pelvis of the pose.
I figured that getting information about the camera could make it possible to estimate this distance. I was able to retreive a Camera Projection Matrix from WebXR data. This projection matrix allows for camera FOV calculation.
There is another parameter I am missing allow for distance calculation.
I have been looking into this post that explains how to estimate the device size in inches, which would then make it possible to calculate the distance (schema image). The problem with this approach is that the device size estimation is not very accurate.
Is there something I am missing? is there something else I could use to achieve this?