An image made up of integer class-ids.

The shape of the TensorData must be mappable to an HxW tensor. Each pixel corresponds to a depth value in units specified by meter.

Leading and trailing unit-dimensions are ignored, so that 1x640x480x1 is treated as a 640x480 image.


Required: TensorData

Optional: DrawOrder


Simple segmentation image

"""Create and log a segmentation image.""" import numpy as np import rerun as rr # Create a segmentation image image = np.zeros((8, 12), dtype=np.uint8) image[0:4, 0:6] = 1 image[4:8, 6:12] = 2 rr.init("rerun_example_segmentation_image", spawn=True) # Assign a label and color to each class rr.log("/", rr.AnnotationContext([(1, "red", (255, 0, 0)), (2, "green", (0, 255, 0))]), timeless=True) rr.log("image", rr.SegmentationImage(image))