Function cvcudaHQResizeImageBatchSubmit

Function Documentation

NVCVStatus cvcudaHQResizeImageBatchSubmit(NVCVOperatorHandle handle, cudaStream_t stream, const NVCVWorkspace *workspace, NVCVImageBatchHandle in, NVCVImageBatchHandle out, const NVCVInterpolationType minInterpolation, const NVCVInterpolationType magInterpolation, bool antialias, const HQResizeRoisF roi)

Executes the HQResize operation on the given cuda stream. This operation does not wait for completion.

Limitations:

Input, Output: Data Layout: NVCV_TENSOR_HWC

Number of channels: [1, 2, 3, 4]

Data Type

Allowed

8bit Unsigned

Yes

8bit Signed

No

16bit Unsigned

Yes

16bit Signed

Yes

32bit Unsigned

No

32bit Signed

No

32bit Float

Yes

64bit Float

No

Input/Output dependency

Property

Input == Output

Data Layout

Yes

Data Type

No (output can be the same or float32).

Channels

Yes

Width

No

Height

No

Samples

Yes

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

    • Must not be NULL.

  • stream[in] Handle to a valid CUDA stream.

  • workspace[in] The workspace with memory for intermediate results. The requirements for a given input can be acquired with a call to cvcudaHQResizeTensorBatchGetWorkspaceRequirements or cvcudaHQResizeGetMaxWorkspaceRequirements.

  • in[in] The ImageBatchVarShape batch of input samples.

  • out[in] The ImageBatchVarShape batch of output samples.

  • minInterpolation[in] The type of interpolation to be used when downsampling an extent (i.e. when output extent is smaller than the corresponding input extent). Supported interpolation formats are: NVCV_INTERP_NEAREST, NVCV_INTERP_LINEAR, NVCV_INTERP_CUBIC, NVCV_INTERP_LANCZOS, and NVCV_INTERP_GAUSSIAN.

  • magInterpolation[in] The type of interpolation to be used when upsampling an extent (i.e. when output extent is bigger than the corresponding input extent). Supported interpolation formats are: NVCV_INTERP_NEAREST, NVCV_INTERP_LINEAR, NVCV_INTERP_CUBIC, NVCV_INTERP_LANCZOS, and NVCV_INTERP_GAUSSIAN.

  • antialias[in] Whether to use antialiasing when downsampling. The value is ignored for minInterpolation = NVCV_INTERP_NEAREST.

  • roi[in] Optional region of interest for the input, in (D)HW layout. The roi can be described as a list of elements for each sample or a list containing a single element to be used for all the samples in the batch. If, for some axis, the low bound is bigger than the high bound, the image is flipped in that dimension.

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.