Advanced Settings

Sensing Modes

The ZED SDK provides two modes for depth sensing: STANDARD and FILL.

Standard Mode

The STANDARD mode is the default depth sensing mode with the ZED. The STANDARD mode preserves distance metrics and shapes, and runs faster than the FILL mode, but it contains holes due to visual occlusions and filtering. These holes are represented by black areas in the depth image. Use the STANDARD mode for applications such as autonomous navigation, obstacle detection, 3D mapping, people detection and tracking.

To configure depth sensing in STANDARD mode, set SENSING_MODE_STANDARD in RuntimeParameters.

// Grab depth in STANDARD mode
RuntimeParameters runtime_parameters;
runtime_parameters.sensing_mode = SENSING_MODE_STANDARD.
if (zed.grab(runtime_parameters) == SUCCESS) {
}

In STANDARD mode, holes (black pixels) have different values depending on their type. They are associated with an enum:

  • NAN referred as OCCLUSION_VALUE. The depth of the pixel cannot be estimated as it is occluded or an outlier.
  • -INFINITY referred as TOO_CLOSE. The depth of the pixel cannot be estimated as it is too close to the camera.
  • INFINITY referred as TOO_FAR. The depth of the pixel cannot be estimated as it is too far from the camera.

You can check for valid depth values using isValidMeasure().

Fill Mode

The FILL mode provides a fully dense depth map with a Z value for every pixel (X, Y) in the left image. The FILL mode fills holes and occlusions in the depth map and adds a filtering stage that improves edges and temporal stability but can alter the actual distance of objects in the scene.

This mode is recommended for applications such as mixed reality capture and visual effects. The FILL mode requires more resources and will run at a lower FPS than the STANDARD mode.

To configure depth sensing in FILL mode, set SENSING_MODE_FILL in RuntimeParameters.

Confidence Map

You can retrieve a confidence map that represents the confidence of a given distance measure (Z) for every pixel (X, Y) in the image. Confidence values vary between 0 and 100, 0 representing the lowest confidence value possible.

sl::Mat confidence_map;
zed.retrieveMeasure(confidence_map,MEASURE_CONFIDENCE);

Depth Modes

Several depth modes are available to improve performance in certain applications: ULTRA, QUALITY, MEDIUM and PERFORMANCE. These settings adjust the level of accuracy, range and computational performance of the depth sensing module.

  • The Ultra mode offers the highest depth range and better preserves Z-accuracy along the sensing range.
  • The Quality and Medium modes offer a compromise between quality and speed.
  • The Performance mode disables some filtering operations and oeprates at a lower resolution to improve performance and frame rate.

Generally speaking, we recommend using the ULTRA mode for both desktop and embedded applications. If your application requires a lot of resources, switch to PERFORMANCE mode.

Depth Range

The default depth perception range for the ZED is 0.7 - 20m (2.3 to 65 feet). It is possible to reduce the minimum distance for depth perception down to 30cm at the cost of increased computation.

InitParameters init_parameters;
init_parameters.coordinate_units = UNIT_CENTIMETERS;
init_parameters.depth_minimum_distance = 30 ; // Set the minimum depth perception distance at 30cm

Tips:

  • The maximum depth range can be reduced to clamp values above a certain distance using setDepthMaxRange().
  • Performance can be improved by increasing the minimum depth perception distance. For applications using long-range depth sensing, increase the minimum distance to 1m or more.

Depth Accuracy

The ZED uses triangulation to estimate depth from the disparity image, with the following formula describing how depth resolution changes over the range of the camera:

Dr=Z^2*alpha, where Z is the distance and alpha a constant.

Depth accuracy decreases quadratically over the z-distance, with a depth accuracy of 1% of the distance in the near range to 9% in the far range. Depth accuracy can also be affected by outliers’ measurements on homogenous and textureless surfaces such as white walls, green screens and specular areas. These surfaces usually generate temporal instability in depth measurements.

Best Practices

The ZED can be used both indoors and outdoors at long range (up to 20m). The configuration that offers the best depth accuracy is to place the camera at a working distance of 1 meter of the scene. To capture fast movements, use the camera high-speed modes (HD720 @ 60 FPS or VGA @ 100 FPS). Avoid using the camera in very low-light environments as the camera does not use IR but color images for depth perception.

You can also extend the range of the USB cable up to 15m by using USB 3.0 extension cables, and up to 100m using an optical fiber USB 3.0 extension.