• DepthAI-v2
  • Inconsistent Depth Measurement Offset (100~150mm) with OAK-D-Pro (Fixed Focus)

Hi Luxonis,

I consistently observe a 100~200mm offset between the depth values returned by the OAK-D-Pro and physical measurements (using a ruler).

For example, at a ground-truth distance of 1000 mm, the camera reports 1150 mm; at 800 mm, the camera reports 914 mm; at 1300 mm, it reports 1500 mm. This discrepancy occurs across multiple test scenarios.

Could you provide guidance on analysing the case (whether it be a hardware or software problem) and troubleshooting? Thank you!

Device Details:

  • Model: OAK-D-Pro (Fixed Focus)

  • Host OS: Ubuntu 22.04

  • DepthAI SDK Version: 2.19.0

here is my code used:

$$

Extract and output the center pixel of the depth image

import depthai as dai
import numpy as np
import cv2
from datetime import timedelta

pipeline = dai.Pipeline()

monoLeft = pipeline.create(dai.node.MonoCamera)
monoRight = pipeline.create(dai.node.MonoCamera)
color = pipeline.create(dai.node.ColorCamera)
stereo = pipeline.create(dai.node.StereoDepth)
sync = pipeline.create(dai.node.Sync)

xoutGrp = pipeline.create(dai.node.XLinkOut)

xoutGrp.setStreamName("xout")

monoLeft.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P)
monoLeft.setCamera("left")
monoRight.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P)
monoRight.setCamera("right")

stereo.setDefaultProfilePreset(dai.node.StereoDepth.PresetMode.HIGH_ACCURACY)

color.setCamera("color")

sync.setSyncThreshold(timedelta(milliseconds=50))

monoLeft.out.link(stereo.left)
monoRight.out.link(stereo.right)

stereo.depth.link(sync.inputs["depth"])
color.video.link(sync.inputs["video"])

sync.out.link(xoutGrp.input)

disparityMultiplier = 255.0 / stereo.initialConfig.getMaxDisparity()
with dai.Device(pipeline) as device:
queue = device.getOutputQueue("xout", 10, False)
while True:
msgGrp = queue.get()
for name, msg in msgGrp:
frame = msg.getCvFrame()
if name == "depth":
print(frame[200][320])
cv2.imshow(name, frame)
if cv2.waitKey(1) == ord("q"):
break
$$

    qywqyw
    First thing is to update depthai to above 2.28. You are using a very old version. Though I see you are using sync node so I guess you meant 2.29..

    Can you give me the camera MXID? I can check the factory calibration logs.

    Thanks,
    Jaka