Operators
Individual operator samples demonstrating specific CV-CUDA operations.
Overview
The operator samples show focused functionality for understanding specific operations:
Gaussian - Blur and smoothing with configurable kernel and sigma
Resize - Image resizing with various interpolation methods (linear, cubic, area, nearest)
Reformat - Tensor layout conversions (HWC, CHW, NHWC, NCHW)
Stack - Batch creation from multiple tensors for parallel processing
Label - Connected component labeling for region identification
These samples are perfect for:
Learning individual operator behavior
Understanding operator parameters
Quick experimentation
Building custom pipelines
Operator Samples
Common Usage Patterns
Single Operator
Simple, focused operation:
import cvcuda
from common import read_image, write_image
image = read_image("input.jpg")
result = cvcuda.gaussian(image, (5, 5), (1.0, 1.0))
write_image(result, "output.jpg")
Chaining Operators
Combine multiple operations:
image = read_image("input.jpg")
resized = cvcuda.resize(image, (224, 224, 3))
blurred = cvcuda.gaussian(resized, (5, 5), (1.0, 1.0))
write_image(blurred, "output.jpg")
Batch Processing
batch = cvcuda.stack([read_image(p) for p in paths])
processed = cvcuda.gaussian(batch, (5, 5), (1.0, 1.0))
See Also
Applications - End-to-end pipelines
Common Utilities - Helper functions
Python API - Complete operator API documentation