Hello,

Using: OAK-D-Lite

I've encountered an issue with depth generation using DepthAI, specifically concerning notable fragmentation in the output. During a comparative test between the default depth generation settings of DepthAI and OpenCV's SBGM, I observed that the fragmentation in DepthAI's depth output is significantly more pronounced than in SBGM's.

I'm aware that filtering options are available and they work fairly well, the magnitude of the difference without them is odd.

I'm seeking guidance on how to address and potentially resolve this issue. If there are any recommended solutions or adjustments to mitigate the observed fragmentation, your insights would be greatly appreciated.

For reference:

Color:

Depth AI:

SBGM (FYI: Not aligned to the color camera):

Hi @vkmNuller ,
Likely it's just the confidence threshold is different. If you set it to higher (255) for the depthai, you'd get more (valid) depth pixels, but they'd be less accurate. Thoughts?
Thanks, Erik

    Hi erik,

    I attempted to adjust the confidence threshold to 255, but it appears that this is the default value. Do you have any other suggestions or settings that could assist in reducing the fragmentation?

    Hi @vkmNuller
    I think the idea is to set it lower than 255. Right now some squares have max confidence while the rest likely have it a little lower. As erik said, lowering the threshold will give you more valid pixels, but they might be less accurate since "the algo is not sure about their depth".

    stereo.confidenceMap.link(xout.input) should give you an idea of what to set the threshold to.

    Thanks,
    Jaka

    Hi @vkmNuller ,
    The only other option I could suggest would be filtering then. The texture of the lower cupboard is quite bad (no features / low light), so I'd suggest active stereo (Pro OAK) in such cases.
    Thanks, Erik