Bifrost depth maps

Rendering with RenderParams.RgbWithDepth() will return depth maps in the downloaded dataset. See Render images for more information on render params.

Parsing depth maps

Bifrost depth maps can be opened with Pillow. To retrieve the depth value of a pixel, convert it to a NumPy array.

import numpy as np
from PIL import Image

depth_image = Image.open("path/to/depth_file.tif")
depth_array = np.array(depth_image)

# depth is in meters from camera
depth_value = depth_array[y, x]

See the following depth map explanation for a step-by-step guide on how to open a Bifrost depth map file and retrieve depth values from the image.

Maximum depth value

The maximum depth value in Bifrost depth maps is 1,000,000 meters. This value most frequently occurs when the sky is visible in the image, as the sky has no finite depth from the camera’s perspective.