Hello, all! I am wanting to calculate a depth values for each pixel rather than just the disparity map output. I can pull the ‘lens_pos’ from the calibration file for each frame but I can’t find how to convert the disparity pixel value to a depth measurement? I am assuming that it is based on the ‘lens_pos’ value but I am unsure. Am I heading down the right path with this?
Hi @srbecker,
Not exactly. The lens_pos
parameters that you can set using the camera settings example is related to the focal length of the RGB camera (when not in autofocus).
To calculate the depth I recommend to take a look on Luxonis Documentation.
QUICK TIP: You can find the calibration parameters for the cameras using the Camera Calibration Example. There you will see parameters for the left, right and RGB cameras. Most importantly is to get the width of the image (1280) and the HFOV (127). That will give a focal distance in pixels of 297.56.