Image Wrapper classes
- group NVCV_CPP_CUDATOOLS_IMAGEWRAP
-
template<typename T>
class ImageBatchVarShapeWrap - #include <ImageBatchVarShapeWrap.hpp>
Image batch var-shape wrapper class to wrap ImageBatchVarShapeDataStridedCuda.
ImageBatchVarShapeWrap is a wrapper of an image batch (or a list of images) of variable shapes. The template parameter
T
is the type of each element inside the wrapper, and it can be compound type to represent a pixel type, e.g. uchar4 for RGBA images.cudaStream_t stream; cudaStreamCreate(&stream); nvcv::ImageBatchVarShape imageBatch(samples); auto *imageBatchData = imageBatch.exportData<nvcv::ImageBatchVarShapeDataStridedCuda>(stream) nvcv::cuda::ImageBatchVarShapeWrap<uchar4> wrap(*imageBatchData); // Now wrap can be used in device code to access elements of the image batch via operator[] or ptr method.
Image batch var-shape wrapper class to wrap ImageBatchVarShapeDataStridedCuda.
This class is specialized for non-constant value type.
- Template Parameters:
T – Type (it can be const) of each element inside the image batch var-shape wrapper.
T – Type (non-const) of each element inside the image batch var-shape wrapper.
Subclassed by nvcv::cuda::ImageBatchVarShapeWrapNHWC< T >
-
template<typename T>
class ImageBatchVarShapeWrapNHWC : private nvcv::cuda::ImageBatchVarShapeWrap<T> - #include <ImageBatchVarShapeWrap.hpp>
Image batch var-shape wrapper NHWC class to wrap ImageBatchVarShapeDataStridedCuda and number of channels.
This class handles number of channels as a separate run-time parameter instead of built-in
T
. It considers interleaved channels, where they appear in a packed sequence at the last dimension (thus NHWC). It also considers each image in the batch has a single plane.Note
The class ImageBatchVarShapeWrap can be used with its template parameter
T
type as a compound type, where its number of elements yield the number of channels.- Template Parameters:
T – Type (it can be const) of each element inside this wrapper.
-
template<typename T>