Depth image artifacts

Hello,

I’ve created a test app in C# where I want to filter out everything but person’s silhouette (using distance threshold). However the depth image contains artifacts as shown on the picture below - parts of the background merges with the silhouette. The ZED depth viewer shows the same results no matter the parameters (using Neural Plus model). Will this be improved anytime soon or do you know of any approach (or filtering) how to remove such artifacts? Thanks a lot!

Hi @Tomas
Could you please share more information about your setup and code?

What depth mode are you using?
How do you perform distance thresholding?

Hello @Myzhar ,

thank you for your reply.

My setup is : laptop with RTX5060, ZED 2i camera, SDK 5.0.7, Cuda 12.8.

Initial params:

// Set configuration parameters
InitParameters init_params = new InitParameters();
init_params.resolution = RESOLUTION.HD720;
init_params.cameraFPS = 30;
init_params.depthMode = DEPTH_MODE.NEURAL_PLUS;
init_params.coordinateUnits = UNIT.METER;
init_params.coordinateSystem = COORDINATE_SYSTEM.RIGHT_HANDED_Y_UP;
runtime_parameters = new RuntimeParameters();

runtime params:

        runtime_parameters.removeSaturatedAreas = true;
        runtime_parameters.enableFillMode = true;
        runtime_parameters.enableDepth = true;
        runtime_parameters.textureConfidenceThreshold = 50;
        runtime_parameters.confidenceThreshold = 50;

I’ve tried different values for runtime params without success.

Then I use MEASURE.DEPTH_U16_MM to get depth image and discard all pixels that are further then specific threshold. To remove floor, ceiling and side walls, I use pointcould pixel values.

I experience the same behavior (silhouette not well separated from background) also in ZED Depth Viewer. The problem is present even if the person is wearing high contrast clothes in respect with the background. In that case the silhouette is perfectly visible in the RGB stream, but not correctly cut out using the depth values. I am trying to accomplish kind of green screen effect in normal room conditions. I’d be glad for any suggestions how to combine streams or use any filter that would result in better silhouette extraction.

Thanks and KR,

Tomas

This is the issue. Please try to set it to false and eventually use runtime_parameters.confidenceThreshold to tune the depth quality.

I recommend you set this to 100, or a close value.

Hello @Myzhar ,

thanks for the suggestion! Disabling the fill mode definitely helped, although the results are still inferior to Kinect v2 which uses active depth sensing. I got the best results when keeping the runtime_parameters.confidenceThreshold around 50. However in this case the depthStabilisation is required. This parameter is available in C#, but I didn’t find it in Unity ZED_Rig_Mono. Please could you tell me where can I adjust the depthStabilisation in Unity?

Thanks and KR,

Tomas

Hi,

It seems this parameter is not visible from the Editor, in the inspector window. You can only have access to the value inside the code (here : zed-unity/ZEDCamera/Assets/SDK/Helpers/Scripts/ZEDManager.cs at master · stereolabs/zed-unity · GitHub)

1 Like