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.
Package info#
| Package | holoscan-visualization |
|---|---|
| GitHub repository | nvidia-holoscan/holoscan-sdk |
| Version | 5.0.0 |
| C++ namespace | holoscan::visualization |
| Python namespace | holoscan.visualization |
| Holoscan SDK | 5.0.0 or later, tested with 5.0.0 |
| Rendering | CUDA and Vulkan |
| Platforms | x86_64, aarch64 |
| Languages | C++, Python |
| License | Apache-2.0 |
| Maintainer | Holoscan Team, NVIDIA |
| Debian package | holoscan-visualization |
| PyPI package | holoscan-visualization-cu13 |
Operators#
HolovizOpcomposites images, geometry, text, and color-mapped data (CUDA and Vulkan required; declare layer capacity before running the graph).
Quick Start#
Installation#
Configure the NVIDIA repository for your platform using the SDK installation guide, then install the module and its matching Core dependency.
sudo apt update
sudo apt install holoscan-visualization
Use a Python 3.12 or newer virtual environment with CUDA 13.
python -m pip install holoscan-visualization-cu13
No Yocto recipe is published for this SDK 5 module yet. The current Holoscan Yocto layer targets SDK 4.6.
Example Usage#
Display an RGBA image stream in a 1920 × 1080 window. These fragments omit the image producer and graph execution.
find_package(holoscan COMPONENTS visualization REQUIRED)
target_link_libraries(my_pipeline PRIVATE holoscan::visualization)
If the SDK is outside CMake's search paths, configure your application with -Dholoscan_DIR=<prefix>/lib/cmake/holoscan, replacing <prefix> with the SDK installation prefix.
#include <holoscan/visualization/holoviz_op.hpp>
// ...
namespace viz = holoscan::visualization;
viz::LayerStack layers;
layers.add_image_layer("video", viz::ImageLayerDesc{
.format = viz::ImageFormat::kR8G8B8A8Unorm,
.max_width = 1920, .max_height = 1080,
});
auto visualizer = graph.op<viz::HolovizOp>(
"visualizer", std::move(layers),
viz::WindowSinkDesc{.title = "Holoscan", .width = 1920, .height = 1080});
// ...
from holoscan.visualization.operators import HolovizOp, ImageLayer, WindowSink
# ...
visualizer = HolovizOp(
graph, "visualizer",
layers=[ImageLayer(port_name="video", format="rgba8_unorm",
max_width=1920, max_height=1080)],
sink=WindowSink(title="Holoscan", width=1920, height=1080),
)
# ...
Docs#
HolovizOp#
HolovizOp renders images, geometry, text, and lookup-table layers into one composed scene. Layers are declared in drawing order, so a camera image can form the background while detections, labels, and other graphics appear above it. The operator can display the result in a window, send it directly to a display, or publish a CUDA image for downstream processing.
Rendering is driven either by arrivals on a chosen layer or by a periodic clock. Other layer inputs can be retained between renders, allowing slower overlays to accompany a faster video stream; max_input_age bounds how long retained data stays usable. Scene capacities are declared before execution so GPU resources can be allocated before the first frame.
| Parameter | What it sets |
|---|---|
layers |
Ordered image, geometry, text, or LUT declarations, including maximum capacities |
sink |
Window, exclusive display, or CUDA image output |
trigger |
Render when a selected layer receives data (default), or at a clock period; a clock trigger defaults to 60 Hz |
max_input_age |
Maximum age of retained layer inputs |
Scene and output#
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.
Remarks#
Set every layer's maximum capacity before execution; image layers use max_width and max_height. Window output requires display access, and exclusive display requires Linux DRM access. Choose max_input_age to keep stale overlays from persisting beyond the application's tolerance.
Layer sources use straight, non-premultiplied alpha. Layer dimensions and formats must match the incoming data. HolovizOp is the supported interface in 5.0; the underlying HoloViz rendering APIs are internal and still evolving.
Python accepts typed declarations or plain dictionaries such as {"kind": "image", ...}. See the Visualization reference for layer, sink, and trigger options.
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 |
The direct-display and sub-frame examples exercise the internal rendering layer; use the operator examples above for application integration.