Reconstructing 3D data points from DepthScene

Hello,

I am trying to add a feature to my App that allows the user to, take a picture, open the image and by tapping on the screen to measure a linear distance on the image. According to this thread, by saving the cameraInstrincsInverse matrix and the localToWorld matrix, I should be able to get the 3D data points by using the location tapped on the screen and the depth from the SceneDepth API.

I can't seem to find a formula using those parameters that allows me to compute the data I am looking for.

Any help is appreciated! Thank you!

Reconstructing 3D data points from DepthScene
 
 
Q