ImageResize#
Functions#
- NVCVStatus pvaImageResizeCreate(NVCVOperatorHandle *handle, NVCVImageRequirements *inImageRequirements, NVCVImageRequirements *outImageRequirements, PVAImageResizeMethodType resizeType)
Constructs an instance of the ImageResize operator.
- NVCVStatus pvaImageResizeSubmit(NVCVOperatorHandle handle, cupvaStream_t stream, NVCVImageHandle in, NVCVImageHandle out)
Executes the image resize operation.
Functions#
- NVCVStatus pvaImageResizeCreate(
- NVCVOperatorHandle *handle,
- NVCVImageRequirements *inImageRequirements,
- NVCVImageRequirements *outImageRequirements,
- PVAImageResizeMethodType resizeType,
Constructs an instance of the ImageResize operator.
Limitations:
The scale factor for width: outputWidth / inputWidth >= 1/3.0f.
The scale factor for height: outputHeight / inputHeight >= 1/3.0f.
Input and output image sizes must be larger than 64x64.
Input: Image sizes and formats are specified in inImageRequirements.
Image Format
Allowed
RGB
Yes
RGBA
Yes
NV12
Yes
U8
Yes
U16
Yes
Output: Image sizes and formats are specified in outImageRequirements.
Input/Output Dependency:
Property
Input == Output
Format
Yes
Interpolation Type:
ParametersMethod Type | Allowed ------------------ | ------------- Nearest Neighbor | Yes Bilinear | Yes Catmull-Rom | No
- Parameters:
handle – [out] Where the operator instance handle will be written to.
Must not be NULL.
inImageRequirements – [in] Pointer to the NVCVImageRequirements structure which contains image shape, strides, and format information.
outImageRequirements – [in] Pointer to the output image NVCVImageRequirements structure.
resizeType – [in] Interpolation method to perform image resize. PVAImageResizeMethodType.
- 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 pvaImageResizeSubmit(
- NVCVOperatorHandle handle,
- cupvaStream_t stream,
- NVCVImageHandle in,
- NVCVImageHandle out,
Executes the image resize operation.
- Parameters:
handle – [in] Handle to the operator.
Must not be NULL.
stream – [in] Handle to a valid CUPVA stream.
in – [in] Input image handle.
out – [out] Output image handle.
- 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.