ImageResize#

Functions#

NVCVStatus pvaImageResizeCreate(NVCVOperatorHandle *handle, NVCVImageRequirements *inImageRequirements, NVCVImageRequirements *outImageRequirements, PVAInterpolationType resizeType)

Constructs an instance of the ImageResize operator.

NVCVStatus pvaImageResizeSubmit(NVCVOperatorHandle handle, cupvaStream_t stream, NVCVImageHandle in, NVCVImageHandle out)

Submits the ImageResize operator to a cuPVA stream.

NVCVStatus pvaImageResizeSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVImageHandle in, NVCVImageHandle out)

Submits the ImageResize operator to a CUDA stream.

Functions#

NVCVStatus pvaImageResizeCreate(
NVCVOperatorHandle *handle,
NVCVImageRequirements *inImageRequirements,
NVCVImageRequirements *outImageRequirements,
PVAInterpolationType 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:

 Method Type        | Allowed
 ------------------ | -------------
 Nearest Neighbor   | Yes
 Bilinear           | Yes
 Catmull-Rom        | No
Parameters

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. PVAInterpolationType.

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,
)#

Submits the ImageResize operator to a cuPVA stream.

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.

NVCVStatus pvaImageResizeSubmit(
NVCVOperatorHandle handle,
cudaStream_t stream,
NVCVImageHandle in,
NVCVImageHandle out,
)#

Submits the ImageResize operator to a CUDA stream.

Note

CUDA stream support requirements:

  • PVA SDK 2.7.0 or later

  • Jetpack 7 or later

  • DriveOS 7 or later

  • x86 Emulator is not supported

Parameters:
  • handle[in] Handle to the operator.

  • stream[in] Handle to a valid CUDA 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.