How to obtain the true distance depth data per pixel?

My question is in regards to the Depth Data acquired by the TrueDepth camera.

I want to know how to get real distance Depth data from TrueDepth.

I can obtain depth maps but how do I obtain the actual distance values (Z values)?

Answered by DTS Engineer in 727556022

The use case is for measuring the distance from an object to the camera. How am I able to obtain this depth in meter values?

The sample code, Streaming Depth Data from the TrueDepth Camera demonstrates how you can calculate the distance relative to the camera for a pixel in a depth map.

It performs this calculation in the vertexShaderPoints function. Please take a look at this implementation, and then if you need further assistance, please request technical support.

Hello,

The pixel values in the depth map represent linear depth in meters. Are you asking how you can access the pixel values? It might help to know what your use case is.

Accepted Answer

The use case is for measuring the distance from an object to the camera. How am I able to obtain this depth in meter values?

The sample code, Streaming Depth Data from the TrueDepth Camera demonstrates how you can calculate the distance relative to the camera for a pixel in a depth map.

It performs this calculation in the vertexShaderPoints function. Please take a look at this implementation, and then if you need further assistance, please request technical support.

How to obtain the true distance depth data per pixel?
 
 
Q