TestPatternOp
🚧 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
-
TestPatternOp
TestPatternOp generates deterministic CUDA BGRA Tensor frames for graph validation without a camera. It supports color bars and a moving checkerboard pattern.
Input arguments
The constructor takes positive width, height and fps values, plus a TestPatternKind of kColorBars or kCheckerboard. The operator emits one frame per clock period.
Ports and data contract
| Port | Memory | Queue | Trigger | Contract |
|---|---|---|---|---|
output
|
CUDA device, contiguous runtime pool | N/A | OnClock
|
U8 rank-3 tensor with shape [height, width, 4] in BGRA order. Each sample receives a monotonically increasing frame ID.
|
TestPatternOp: color bars -> endpoint A TestPatternOp: checkerboard -> endpoint B
The color-bar pattern changes its phase as frames advance. The checkerboard changes its cell phase as frames advance, making endpoint changes visible in the receiver window.
Build
Follow Holoscan RidgeRun Build and Installation for the module build and installation. The operator-specific include, target, and runtime requirements are listed below.
Include test_pattern/test_pattern.hpp and link holoscan::test_pattern.
Example
The constructor validates positive dimensions and frame rate, checks for byte-size overflow and converts the rate to a nanosecond clock period. The color-bar kernel creates six phase-shifted bars; its phase changes every 30 frame IDs. The checkerboard uses 48-pixel cells and changes phase every 15 frame IDs. Both patterns write BGRA with an opaque alpha channel.
The output is allocated from the runtime Tensor pool and produced by a 16×16 CUDA launch. The operator emits one frame per clock activation and sets a monotonically increasing frame ID. A missing CUDA stream, failed output loan, empty allocation or kernel-launch error is returned as an operator error.
auto pattern = graph.op<TestPatternOp>(
"pattern", 1920, 1080, 30, TestPatternKind::kColorBars);
graph.add_flow(pattern->output, display->input);