Images
def rerun.log_image(entity_path, image, *, draw_order=None, ext=None, timeless=False, recording=None, jpeg_quality=None)
Log a gray or color image.
The image should either have 1, 3 or 4 channels (gray, RGB or RGBA).
Supported dtypes
- uint8, uint16, uint32, uint64: color components should be in 0-
max_uint
sRGB gamma space, except for alpha which should be in 0-max_uint
linear space. - float16, float32, float64: all color components should be in 0-1 linear space.
- int8, int16, int32, int64: if all pixels are positive, they are interpreted as their unsigned counterparts. Otherwise, the image is normalized before display (the pixel with the lowest value is black and the pixel with the highest value is white).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entity_path |
str
|
Path to the image in the space hierarchy. |
required |
image |
Tensor
|
A Tensor representing the image to log. |
required |
draw_order |
float | None
|
An optional floating point value that specifies the 2D drawing order. Objects with higher values are drawn on top of those with lower values. The default for images is -10.0. |
None
|
ext |
dict[str, Any] | None
|
Optional dictionary of extension components. See rerun.log_extension_components |
None
|
timeless |
bool
|
If true, the image will be timeless (default: False). |
False
|
recording |
RecordingStream | None
|
Specifies the |
None
|
jpeg_quality |
int | None
|
If set, encode the image as a JPEG to save storage space. Higher quality = larger file size. A quality of 95 still saves a lot of space, but is visually very similar. JPEG compression works best for photographs. Only RGB images are supported. Note that compressing to JPEG costs a bit of CPU time, both when logging and later when viewing them. |
None
|
def rerun.log_image_file(entity_path, *, img_bytes=None, img_path=None, img_format=None, timeless=False, recording=None)
Log an image file given its contents or path on disk.
You must pass either img_bytes
or img_path
.
Only JPEGs and PNGs are supported right now.
JPEGs will be stored compressed, saving memory, whilst PNGs will currently be decoded before they are logged. This may change in the future.
If no img_format
is specified, rerun will try to guess it.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entity_path |
str
|
Path to the image in the space hierarchy. |
required |
img_bytes |
bytes | None
|
Content of an image file, e.g. a |
None
|
img_path |
Path | None
|
Path to an image file, e.g. a |
None
|
img_format |
ImageFormat | None
|
Format of the image file. |
None
|
timeless |
bool
|
If true, the image will be timeless (default: False). |
False
|
recording |
RecordingStream | None
|
Specifies the |
None
|
def rerun.log_depth_image(entity_path, image, *, draw_order=None, meter=None, ext=None, timeless=False, recording=None)
Log a depth image.
The image must be a 2D array.
Supported dtypes
float16, float32, float64, uint8, uint16, uint32, uint64, int8, int16, int32, int64
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entity_path |
str
|
Path to the image in the space hierarchy. |
required |
image |
Tensor
|
A Tensor representing the depth image to log. |
required |
draw_order |
float | None
|
An optional floating point value that specifies the 2D drawing order. Objects with higher values are drawn on top of those with lower values. The default for images is -10.0. |
None
|
meter |
float | None
|
How long is a meter in the given dtype? For instance: with uint16, perhaps meter=1000 which would mean you have millimeter precision and a range of up to ~65 meters (2^16 / 1000). |
None
|
ext |
dict[str, Any] | None
|
Optional dictionary of extension components. See rerun.log_extension_components |
None
|
timeless |
bool
|
If true, the image will be timeless (default: False). |
False
|
recording |
RecordingStream | None
|
Specifies the |
None
|
def rerun.log_segmentation_image(entity_path, image, *, draw_order=None, ext=None, timeless=False, recording=None)
Log an image made up of integer class-ids.
The image should have 1 channel, i.e. be either H x W
or H x W x 1
.
See: rerun.log_annotation_context for information on how to map the class-ids to colors and labels.
Supported dtypes
uint8, uint16
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entity_path |
str
|
Path to the image in the space hierarchy. |
required |
image |
ArrayLike
|
A Tensor representing the segmentation image to log. |
required |
draw_order |
float | None
|
An optional floating point value that specifies the 2D drawing order. Objects with higher values are drawn on top of those with lower values. The default for images is -10.0. |
None
|
ext |
dict[str, Any] | None
|
Optional dictionary of extension components. See rerun.log_extension_components |
None
|
timeless |
bool
|
If true, the image will be timeless (default: False). |
False
|
recording |
RecordingStream | None
|
Specifies the |
None
|