Hi,

I am starting this thread to get some help on getting the best quality point clouds with the Oak D Pro W camera. I have setup the depthAI software, and I ran the depthai_demo.py, and after adjusting the IR parameters, I was able to get a descent disparity depth image.

However, I am struggling to convert that to a Point cloud, and save it. I was trying to run the demo https://docs.luxonis.com/projects/sdk/en/latest/samples/PointcloudComponent/SDK_pointcloud/

But my output was really sparse. How do I apply the right parameters, and save that point cloud? It would be great to get some help, and I can also provide more details as needed.

    Hi HarshD
    Could you post some images?
    Usually changing the stereo config is the most beneficial. Copied from https://github.com/luxonis/depthai-experiments/tree/master/gen2-pointcloud/device-pointcloud:

    config = stereoDepthNode.initialConfig.get()
        config.postProcessing.speckleFilter.enable = True
        config.postProcessing.speckleFilter.speckleRange = 60
        config.postProcessing.temporalFilter.enable = True
    
        config.postProcessing.spatialFilter.holeFillingRadius = 2
        config.postProcessing.spatialFilter.numIterations = 1
        config.postProcessing.thresholdFilter.minRange = 700  # mm
        config.postProcessing.thresholdFilter.maxRange = 4000  # mm
        # config.postProcessing.decimationFilter.decimationFactor = 1
        config.censusTransform.enableMeanMode = True
        config.costMatching.linearEquationParameters.alpha = 0
        config.costMatching.linearEquationParameters.beta = 2
        stereoDepthNode.initialConfig.set(config)
        stereoDepthNode.setLeftRightCheck(lrcheck)
        stereoDepthNode.setExtendedDisparity(extended)
        stereoDepthNode.setSubpixel(subpixel)
        stereoDepthNode.setRectifyEdgeFillColor(0)  # Black, to better see the cutout

    Thanks,
    Jaka

    Here are some pictures. I want to use this on surfaces that do reflect light, for example a white cup.

    This is the code I am using

    from depthai_sdk import OakCamera

    with OakCamera() as oak:
    color = oak.camera('color')
    stereo = oak.create_stereo('800p', fps=60)
    stereo.config_stereo(align=color)
    stereo.set_ir(dot_projector_brightness=0)
    pcl = oak.create_pointcloud(stereo=stereo, colorize=color)
    oak.visualize(pcl, visualizer='depthai-viewer')
    oak.start(blocking=True)

    Hi HarshD
    This is really strange, but could actually be related to depthai-viewer. Could you try running the pointcloud example I sent above to see, if there is any difference. Your depth map look relatively ok. I don't really se a reason why the pointcloud would be bad.

    Thanks,
    Jaka