Image

A monochrome or color image.

See also archetypes.DepthImage and archetypes.SegmentationImage.

The raw image data is stored as a single buffer of bytes in a [rerun.components.Blob]. The meaning of these bytes is determined by the ImageFormat which specifies the resolution and the pixel format (e.g. RGB, RGBA, …).

The order of dimensions in the underlying components.Blob follows the typical row-major, interleaved-pixel image format.

Rerun also supports compressed images (JPEG, PNG, …), using archetypes.ImageEncoded. Compressing images can save a lot of bandwidth and memory.

Components components

Required: Blob, Resolution2D

Optional: PixelFormat, ColorModel, ChannelDatatype, Opacity, DrawOrder

Shown in shown-in

Example example

image_simple imagesimple

"""Create and log an image."""

import numpy as np
import rerun as rr

# Create an image with numpy
image = np.zeros((200, 300, 3), dtype=np.uint8)
image[:, :, 0] = 255
image[50:150, 50:150] = (0, 255, 0)

rr.init("rerun_example_image", spawn=True)

rr.log("image", rr.Image(image))