depthai-experiments icon indicating copy to clipboard operation
depthai-experiments copied to clipboard

Gen2 rgb depth align

Open MOj0 opened this issue 4 years ago • 4 comments

MOj0 avatar Sep 09 '21 16:09 MOj0

@MOj0 when you get it working it would be great if you could share screenshots here, thanks!

Erol444 avatar Sep 11 '21 12:09 Erol444

Front

Back

MOj0 avatar Sep 13 '21 19:09 MOj0

I get pretty clean and nice point clouds with these stereo settings (using depthai v2.11.1) – even without removing statistical outliers:

    stereo.initialConfig.setConfidenceThreshold(255)
    stereo.setLeftRightCheck(True)
    stereo.setExtendedDisparity(False)
    stereo.setSubpixel(True)
    stereo.setDepthAlign(dai.CameraBoardSocket.RGB)

I wonder to what extent the advanced stereo settings (as used in this sample)) can further improve the result.... does anyone have experience with this?

tobias-zucali avatar Oct 20 '21 16:10 tobias-zucali

I get pretty clean and nice point clouds with these stereo settings (using depthai v2.11.1) – even without removing statistical outliers:

    stereo.initialConfig.setConfidenceThreshold(255)
    stereo.setLeftRightCheck(True)
    stereo.setExtendedDisparity(False)
    stereo.setSubpixel(True)
    stereo.setDepthAlign(dai.CameraBoardSocket.RGB)

I wonder to what extent the advanced stereo settings (as used in this sample)) can further improve the result.... does anyone have experience with this?

Here is an example how to integrate all those settings into an opencv window, to control everything through buttons and sliders.

I suggest enabling Census transform mean mode and setting alpha, beta to 0 and 2.

You can also set from code:

currentConfig = stereo.initialConfig.get()
currentConfig.censusTransform.enableMeanMode = True
currentConfig.costMatching.linearEquationParameters.alpha = 0
currentConfig.costMatching.linearEquationParameters.beta = 2
stereo.initialConfig.set(currentConfig)

SzabolcsGergely avatar Oct 20 '21 16:10 SzabolcsGergely