Hello,
I experimented with the depth_raw-stream of the OAK-D which provides a grayscale-image with a 16 bit value for each pixel as depth data in mm. I noticed however that not every value of the 16 bit data is used so it is not really a 16 bit resolution. Especially with greater distances the resolution drastically decreases to the point where it is unusable for our application.

Example:
An object is a distance of about 6m away from the camera, the camera shows a value of 6623mm.
While slowly approaching the object the value does not decrease continuously, instead it suddenly jumps to 6021mm.

Is this by design or can it be configured to behave differently?

Kind regards,
Paul

    Paul

    Hi Paul,

    Great question. So this is actually a result of the standard disparity, which is all that is currently available via OAK-D. In this standard disparity mode, the disparity search is up to 96 pixels, and the results are single, full-pixel offsets.

    So what this means in terms of depth steps is that there are actually only 96 total depth steps in this mode. So that is what you are seeing.

    We are planning on supporting sub-pixel disparity (see here), and actually we would have had it out already if it weren't for a bug in implementing LR-check (which improves disparity matching capability).

    So with subpixel, there are 5 additional bits of information. So there are an additional 31 steps between a full-pixel disparity match.

    See some details here and a visualization of what you are describing here, and reproduced below:

    So with the subpixel, there will exist those 31 additional steps in-between each of the full-pixel steps you see there.

    So it should be significantly more granular. Also, for visualizing the point cloud, see here for an example.

    So the 31 additional steps are the precision of the system, but not necessarily the accuracy. And the accuracy will likely be dependent on multiple factors like lighting, calibration quality, rigidity of the mount, etc.

    Thoughts?

    And sorry about the delay. Have been mostly offline because we just had a kid. :-)

    Thanks,
    Brandon

    Oh, and so for the jump that you are seeing from 6,021mm to 6,623mm with standard disparity, once we have subpixel out (and assuming good accuracy), these jumps should be (on average, since it is 1/r relationship) around 19.4mm jumps instead of the 602mm jump you are seeing now.

    4 days later

    Thank you.
    Great news. Do you have any time estimation for this feature? Looking forward to testing it.

    Congratulations on your child.
    Don't worry about the response time - I wasn't online either.

    Thanks,
    Paul

      Paul

      Thanks and thanks. :-) So we had a couple triage things pop up, so likely sub-pixel will be out mid-October. It would be earlier, but we're needing to hop on some critical bug fixes first.

      Thanks again,
      Brandon