Skip to content
Skip to content
Modules Visualization

Version 5.0.0 · Apache-2.0 · C++ and Python

Holoscan Visualization

Holoscan Visualization puts your pipeline’s results on screen with low latency. HolovizOp composites images, geometry, text, and color-mapped data into a window, a fullscreen display, or a CUDA tensor for the next operator. Underneath it, HoloViz is a CUDA and Vulkan rendering foundation built for the fixed scenes that real applications draw every frame.

At a glance

Packageholoscan-visualization
Version5.0.0
C++ namespaceholoscan::visualization
Python namespaceholoscan.visualization
Holoscan SDK5.0.0 or later, tested with 5.0.0
RenderingCUDA and Vulkan
Platformsx86_64, aarch64
LanguagesC++, Python
LicenseApache-2.0
MaintainerHoloscan Team, NVIDIA
Debian packageholoscan-visualization
PyPI packageholoscan-visualization-cu13

HolovizOp is the supported interface in 5.0. The HoloViz rendering layer beneath it is internal and still evolving.

Declare the scene up front

HolovizOp takes its layers, its output, and its trigger when you build the graph. Every layer declares its maximum size, so all GPU resources are allocated before the first frame and the frame loop allocates nothing.

Layer What it draws
Image Camera or processed frames from host or CUDA tensors
Geometry 2D overlays such as points, lines, rectangles, and ovals
Text Labels, counters, and legends over other layers
LUT Single-channel data mapped through a color lookup table
Output Where frames go
Window A desktop window, or an undecorated fullscreen window on a named monitor
Exclusive display A display driven directly, bypassing the compositor (Linux DRM)
CUDA A CUDA-resident image published on the operator’s output for another operator

A layer trigger renders when a chosen layer receives data, which is the default. A clock trigger renders at a fixed period, 60 Hz unless you set one.

Image formats

Format Tensor layout
RGB8 uint8 {H, W, 3}
RGBA8, BGRA8 uint8 {H, W, 4}
RGBA16 uint16 {H, W, 4}
Gray 8-bit, gray 16-bit uint8 {H, W}, uint16 {H, W}
NV12 uint8 {H + H/2, W}, even width and height
YUYV uint8 {H, W, 2}, even width

YUV layers take an explicit model and range: BT.601, BT.709, or BT.2020, full or limited. NV12 and YUYV frames, such as those from Holoscan Camera, display directly.

Examples

Example What it shows
gray_scale_example A native 16-bit grayscale image layer, in C++ and Python
image_formats RGB, NV12, and YUYV input from host or CUDA tensors
text_layer_example Text labels composited over a video layer
cuda_sink_example Two HolovizOp instances chained through the CUDA output, kept on the GPU end to end
holoviz_image_topic A Python graph displaying an image topic in a window
holoviz_cupy_pattern A CuPy-generated pattern published to HolovizOp from Python
holoviz_direct_display Rendering straight to a display without a window or compositor
holoviz_sub_frame Drawing a frame band by band as it arrives, with latency measurement

Use it in an application

Link the installed CMake package:

find_package(holoscan-visualization REQUIRED)
target_link_libraries(my_pipeline PRIVATE holoscan::visualization)

From Python, install holoscan-visualization-cu13 and declare the scene:

import holoscan as hs
from holoscan.visualization.operators import (
    ClockTrigger, HolovizOp, ImageFormat, ImageLayer, PresentMode, WindowSink,
)

visualizer = HolovizOp(
    graph,
    "visualizer",
    layers=[ImageLayer(port_name="video", format=ImageFormat.RGBA8_UNORM,
                       max_width=1920, max_height=1080)],
    sink=WindowSink(title="Holoscan", width=1920, height=1080,
                    present_mode=PresentMode.FIFO_RELAXED, framebuffer_srgb=True),
    trigger=ClockTrigger(period=hs.time.ms(16)),
)

The same declarations also work as plain dictionaries, such as {"kind": "image", ...}.

Source is in the Holoscan SDK repository.

All modules