Why is the depth map so dark?
Last updated: October 23, 2026
When you visualize on screen a depth map obtained with the retrieveMeasure API function, or saved from the ZED Depth Viewer tool, it usually looks very dark because you are looking at a map of metric values and not at an image.
Depth map and the ZED SDK API
The depth map obtained with retrieveMeasure(..., MEASURE::DEPTH) (C++ / Python) is a matrix of 32-bit floating point depth values, expressed in the measurement unit selected with InitParameters::coordinate_units when the camera is opened (default value: millimeters). To visualize it, for example with OpenCV, you must normalize the map and rescale it to the 8-bit grayscale range 0-255.
The formula to apply to each pixel is:
new_value = value / max_range * 255max_range can be the maximum depth distance selected when opening the camera (InitParameters::depth_maximum_distance), the maximum value present in the depth map, or a custom value. Invalid pixels (NAN, -INFINITY, +INFINITY) must be filtered before the normalization.
If you only need to display the depth, we suggest using the retrieveImage API function with the VIEW::DEPTH parameter instead: it returns a ready-to-display 8-bit representation of the depth map. See the Depth Sensing documentation for code examples.
Depth map and the ZED Depth Viewer tool
The image saved with the SAVE command of the ZED Depth Viewer tool is a 16-bit depth map that contains depth values in millimeters, in the range 0-65535 (0 m to 65.535 m).

Objects close to the camera have low depth values and therefore look dark when the saved file is opened with a standard image viewer.
To visualize the objects in the depth map, open it with an image editor and apply a normalization filter, which automatically rescales all the values to visible grayscale levels.
Note: the colored depth displayed in the bottom-left frame of the ZED Depth Viewer tool is obtained with the retrieveImage API function and the VIEW::DEPTH parameter.