Vision Pipeline Example
🚧 Documentation is under development
The Holoscan SDK guide is currently under active development. Some sections may be incomplete or change without notice.
Questions? Contact RidgeRun or email to support@ridgerun.com.
-
Overview
-
Build, Run, and Validate
-
Core Concepts
-
Operators and Graphs
-
Tensor Data and Memory
-
Interprocess Communication
-
-
Application and Operator Development
- Building an HSDK Application
- Writing a Minimal Operator
- Typed Parameters and Configuration
- Reading, Writing, and Forwarding Data
- Writing Tensor Operators
- Complete Operator Patterns
- Authoring Runtime Behavior
- Runtime Parameter Updates
- Lifecycle Callbacks and Restart Control
- Performance and Debugging
- SDK Source Map
-
Operator Reference
-
Core Operators
-
Holoscan Camera
-
Holoscan RidgeRun
- Overview
- Build and Installation
- ArgusCameraOp
- V4L2SourceOp
- V4L2UserPtrSourceOp
- BgraToPlanarTensorOp
- RawBayerToBgraOp
- RawBayerToYoloTensorOp
- YuyvToBgraOp
- TensorRtInferenceOp
- DrmDisplayOp
- DrmBgraDisplayOp
- X11DisplayOp
- CudaCompositorOp
- DepthColorizerOp
- FakesinkOp
- FrameSkipperOp
- InterprocessSrcOp
- TestPatternOp
-
-
Migration from Holoscan 4.x
-
Examples
-
Core
-
Holoscan Camera
-
Holoscan RidgeRun
-
-
Benchmark and Use Cases
-
Holoscan vs GStreamer
- Overview
-
Capture and Display
-
Capture and Inference
- Compare the workloads
- Implemented Applications
- Framework Selection
- Interprocess
-
Vision Pipeline Example
Follow three synthetic frames through image preprocessing and a separate detection branch. The pipeline makes changes in image shape, data type, layout, and candidate selection visible without requiring a camera, model, or display.
The example is a useful starting point for connecting the Core Vision operators in an application. The Ports, Samples, and Payload Types and Tensor Contracts and Memory Types pages provide the vocabulary used below.
What you will learn
- How several operators can form one image-processing path.
- How a static Tensor can be published once and reused by later activations.
- How a second branch can align boxes and scores and produce an NMS mask.
- How an example can check both Tensor values and sample metadata.
Build and run
The shared SDK build page contains the configure and installation steps. After that build, run the installed application in the SDK container:
WORKSPACE="$HOME/holoscan-5.0" cd "$WORKSPACE/holoscan-sdk" INSTALL_DIR="$(./run get_install_dir)" RUN_BIN="/workspace/holoscan-sdk/$INSTALL_DIR/lib/holoscan/examples/vision_pipeline/cpp/vision_pipeline" ./run launch "$INSTALL_DIR" --run-cmd "$RUN_BIN"
The application has no configuration file or command-line options.
Follow the workflow
The source publishes an image, a remap map, boxes, and scores. The image branch applies the following operations:
Operators used
| Operator | Result in this example |
|---|---|
| ResizeOp | Keeps the synthetic U8 image at its original geometry. |
| CustomCropOp | Selects a central 2 × 2 region. |
| CopyMakeBorderOp | Adds a zero border around the cropped image. |
| RemapOp | Samples the central coordinates using a map published with the first frame. |
| ConvertToOp | Changes the image from U8 to F32. |
| NormalizeOp | Applies per-channel baseline values. |
| ReformatOp | Changes the image from interleaved HWC to planar CHW. |
The detection branch sends boxes and scores to NonMaximumSuppressionOp. The first frame produces a U8 mask with the expected selection [1,0,1]. Boxes and scores carry matching frame metadata so the operator evaluates the corresponding candidates together.
The image sink checks the final F32 shape [3,2,2], pixel values, frame identifiers, and capture times. The detection sink checks the mask and its metadata. Intermediate operators run on CUDA, while the sinks copy their final results to the host for inspection.
Expected result
A successful run prints:
vision_pipeline: image and detection branches passed
Return code 77 means the example skipped because no usable CUDA device was available. A nonzero result other than 77 indicates a build, graph, observation, or runtime failure. The result validates the programmed values and metadata checks. It is not a latency or copy-free performance measurement.
If testing was enabled, the same application is registered as VISION_PIPELINE_EXAMPLE in CTest:
ctest --test-dir /path/to/holoscan-sdk/build -R '^VISION_PIPELINE_EXAMPLE$' --output-on-failure