Image

class foxglove.layouts.ImagePanel

Display annotated images.

For more information, see the documentation.

Example
import foxglove.layouts as fl

layout = fl.Layout(
    content=fl.ImagePanel(
        config=fl.ImageConfig(
            image_mode=fl.ImageModeConfig(
                image_topic="/camera/image_raw",
                calibration_topic="/camera/camera_info",
            ),
        ),
    ),
)
config: ImageConfig
title: str | None = None

The title of the panel.

class foxglove.layouts.ImageConfig

Configuration for the image panel.

image_mode: ImageModeConfig | None = None
layers: dict[str, BaseRendererGridLayerSettings | BaseRendererTiledMapLayerSettings | BaseRendererUrdfLayerSettings] | None = None

Settings for layers in the scene, indexed by instanceId.

scene: BaseRendererSceneSettings | None = None
synced_topics: dict[str, bool] | None = None

Per-topic sync opt-in. Key is topic name, value is whether the topic participates in timestamp synchronization when synchronize is enabled. Topics not present default to false.

synchronize: bool | None = None

Enable timestamp based synchronization of visible topics

topics: dict[str, BaseRendererCameraTopicSettings | BaseRendererGridTopicSettings | BaseRendererLaserScanTopicSettings | BaseRendererPointCloudTopicSettings | BaseRendererPosesTopicSettings | BaseRendererPoseTopicSettings | BaseRendererRosGridMapTopicSettings | BaseRendererRosMarkerTopicSettings | BaseRendererRosOccupancyGridTopicSettings | BaseRendererRosPolygonTopicSettings | BaseRendererRosVelodyneScanTopicSettings | BaseRendererRosVoxelGridTopicSettings | BaseRendererSceneUpdateTopicSettings | BaseRendererUrdfTopicSettings | BaseRendererVoxelGridTopicSettings | BaseRendererImageTopicSettings] | None = None

Settings for topics, indexed by topicName

transforms: dict[str, BaseRendererLayerSettingsTransform] | None = None

frameId -> settings

class foxglove.layouts.ImageAnnotationSettings

Settings for an image annotation topic.

visible: bool | None = None

Whether to display the annotation.

class foxglove.layouts.ImageModeConfig

Settings specific to the Image panel.

annotations: dict[str, ImageAnnotationSettings] | None = None

Settings for the image annotations, indexed by topicName

calibration_topic: str | None = None

Calibration topic to use for distortion and 3D markers

color_field: str | None = None

Value used for “colorMap” coloring logic; any numeric field in the message. Used only if “colorMode” is not “flat”.

color_map: Optional[Literal['turbo', 'rainbow']] = None

Color palette for mapping “colorField” values to colors. Used only if “colorMode” is “colormap”.

color_mode: Optional[Literal['flat', 'gradient', 'colormap', 'rgb', 'rgba', 'rgba-fields']] = None

One of: “flat”, “gradient”, “colormap”, “rgb”, “rgba”, or “rgba-fields”.

explicit_alpha: float | None = None

Sets alpha value for all colors. Used only when “colorMode” is “colormap” or “rgb”.

flat_color: str | None = None

Hex code for color of each point. Used only when “colorMode” is “flat”.

flip_horizontal: bool | None = None

Flip image across the vertical axis

flip_vertical: bool | None = None

Flip image across the horizontal axis

gradient: tuple[str, str] | None = None

The two colors to interpolate between. Used only if “colorMode” is “gradient”.

image_schema_name: str | None = None

Message schema to display

image_topic: str | None = None

Camera image or video topic to display.

max_value: float | None = None

Maximum (white) value for single-channel images.

min_value: float | None = None

Minimum (black) value for single-channel images.

overlay_topics: list[ImageOverlayTopicConfig] | None = None

Additional image topics composited on top of the base image.

publish: ImageModePublishConfig | None = None
rectify_image: bool | None = None

Whether to rectify (undistort) the image. If turned off, images will be displayed as is and 3D topic visualization will be disabled.

rotation: Optional[Literal[0, 90, 180, 270]] = None

Amount of image rotation

synchronize: bool | None = None

Use the top-level synchronize setting in BaseRendererConfig instead

video_decoder: str | None = None

Video decoder

class foxglove.layouts.ImageModePublishConfig

Cursor publishing settings.

click_enabled: bool | None = None

Whether click publishing is enabled.

cursor_click_topic: str | None = None

Topic name for publishing cursor position when clicking on the image.

cursor_hover_topic: str | None = None

Topic name for publishing cursor position when hovering over the image.

hover_enabled: bool | None = None

Whether hover publishing is enabled.

class foxglove.layouts.ImageOverlayTopicConfig

Settings for an image overlay topic.

blend_mode: Optional[Literal['alpha', 'add']] = None

How the overlay is composited onto the base image. “alpha” applies standard alpha blending using the overlay opacity. “add” adds the overlay pixel values to the base image.

id: str

Stable identity for editing, deleting, and reordering overlay instances.

opacity: float | None = None

Alpha strength for the overlay.

order: float | None = None

Ascending sort order used when applying overlays.

pixel_alpha_mode: Optional[Literal['none', 'white-transparent']] = None

How to derive per-pixel transparency for supported single-channel raw overlays. “none” keeps the decoded image alpha unchanged. “white-transparent” makes pixels rendered as white fully transparent.

schema_name: str | None = None

Selected schema when a topic is convertible to multiple supported image schemas.

topic: str

Image topic to composite on top of the base image.

visible: bool | None = None

Whether the overlay is currently enabled for drawing.