Function cvcudaMorphologyVarShapeSubmit

Function Documentation

NVCVStatus cvcudaMorphologyVarShapeSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVImageBatchHandle in, NVCVImageBatchHandle out, NVCVImageBatchHandle workspace, NVCVMorphologyType morphType, NVCVTensorHandle masks, NVCVTensorHandle anchors, int32_t iteration, const NVCVBorderType borderMode)

Executes the morphology operation of Dilates/Erodes on images, using an array of variable shape images.

Limitations:

Input: Data Layout: [kNHWC, kHWC] Channels: [1, 3, 4]

Data Type

Allowed

8bit Unsigned

Yes

8bit Signed

No

16bit Unsigned

Yes

16bit Signed

No

32bit Unsigned

No

32bit Signed

No

32bit Float

Yes

64bit Float

No

Output: Data Layout: [kNHWC, kHWC] Channels: [1, 3, 4]

Data Type

Allowed

8bit Unsigned

Yes

8bit Signed

No

16bit Unsigned

Yes

16bit Signed

No

32bit Unsigned

No

32bit Signed

No

32bit Float

Yes

64bit Float

No

Input/Output dependency

 Property      |  Input == Output
-------------- | -------------
 Data Layout   | Yes
 Data Type     | Yes
 Number        | Yes
 Channels      | Yes
 Width         | Yes (per image in/out pair)
 Height        | Yes (per image in/out pair)

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

    • Must not be NULL.

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

  • in[in] Input variable shape tensor.

  • out[out] Output variable shape tensor.

  • workspace[in] Workspace tensor, must be the same size as the input var shape tensor; can be null if not calling Dilate/Erode with an iteration of 1

  • morphType[in] Type of operation to perform (Erode/Dilate). NVCVMorphologyType.

  • masks[inout] 1D Tensor of NVCV_DATA_TYPE_2S32 mask W/H pairs, where the 1st pair is for image 0, second for image 1, etc. Setting values to -1,-1 will create a default 3,3 mask. (Note after the operation the tensor values may be modified by kernel)

  • anchors[inout] 1D Tensor of NVCV_DATA_TYPE_2S32 X/Y pairs, where the 1st pair is for image 0, second for image 1, etc Setting values to -1,-1 will anchor the kernel at the center. (Note after the operation the tensor values may be modified by kernel)

  • iteration[in] Number of times to execute the operation, typically set to 1. Setting to higher than 1 is equivelent of increasing the kernel mask by (mask_width - 1, mask_height -1) for every iteration.

  • borderMode[in] Border mode to be used when accessing elements outside input image, cf. NVCVBorderType.

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.