image.py
rerun.log.image
def 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: color components should be in 0-255 sRGB gamma space, except for alpha which should be in 0-255 linear space.
- uint16: color components should be in 0-65535 sRGB gamma space, except for alpha which should be in 0-65535 linear space.
- float32, float64: all color components should be in 0-1 linear space.
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 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
uint8, uint16, float32, float64
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 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 |
npt.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
|