depthai-experiments
depthai-experiments copied to clipboard
Gen2 rgb depth align
@MOj0 when you get it working it would be great if you could share screenshots here, thanks!


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?
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)