Cvt Color
- group Cvt Color
Functions
-
NVCVStatus cvcudaCvtColorCreate(NVCVOperatorHandle *handle)
Constructs an instance of the CvtColor (convert color operation).
- Parameters:
handle – [out] Where the operator instance handle will be written to.
Must not be NULL.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – Handle is null.
NVCV_ERROR_OUT_OF_MEMORY – Not enough memory to create the operator.
NVCV_SUCCESS – Operation executed successfully.
-
NVCVStatus cvcudaCvtColorSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVTensorHandle in, NVCVTensorHandle out, NVCVColorConversionCode code)
Executes the CvtColor (convert color) operation on the given cuda stream. This operation does not wait for completion.
Limitations:
Input: Data Layout: [kNHWC, kHWC, kNCHW, kCHW] Channels: [1, 3, 4] for kNCHW/kCHW planar tensors; var-shape planar images require RGB8p or RGBA8p compatible conversion codes. Data Type: [U8, S8, U16, S16, S32, F16, F32, F64] depending on conversion code.
Output: Data Layout: [kNHWC, kHWC, kNCHW, kCHW] Channels: [1, 3, 4] for kNCHW/kCHW planar tensors; var-shape planar images require RGB8p or RGBA8p compatible conversion codes. Data Type: Same base type as input, depending on conversion code.
Notes: Planar kNCHW/kCHW support excludes subsampled YUV420 and packed YUV422 conversion codes.
Supported backends:
Backend | Supported ------------- | --------- CUDA | Yes CPU | No
Performance characteristics:
Input | Supported ------------- | --------- Data Layout | Yes Data Type | Yes Channels | Yes
- Parameters:
handle – [in] Handle to the operator.
Must not be NULL.
stream – [in] Handle to a valid CUDA stream.
in – [in] Input tensor.
out – [out] Output tensor.
code – [in] Color conversion code, NVCVColorConversionCode.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside valid range.
NVCV_ERROR_INTERNAL – Internal error in the operator, invalid types passed in.
NVCV_SUCCESS – Operation executed successfully.
-
NVCVStatus cvcudaCvtColorVarShapeSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVImageBatchHandle in, NVCVImageBatchHandle out, NVCVColorConversionCode code)
-
NVCVStatus cvcudaCvtColorCreate(NVCVOperatorHandle *handle)