BilateralFilter#

Functions#

NVCVStatus pvaBilateralFilterCreate(NVCVOperatorHandle *handle, NVCVTensorRequirements *tensorRequirements, const int32_t kernelSize, const NVCVBorderType borderMode, const int32_t borderValue)

Constructs and an instance of the BilateralFilter operator.

NVCVStatus pvaBilateralFilterSubmit(NVCVOperatorHandle handle, cupvaStream_t stream, NVCVTensorHandle in, const float sigmaRange, const float sigmaSpace, NVCVTensorHandle out)

Submits the BilateralFilter operator to a cuPVA stream.

NVCVStatus pvaBilateralFilterSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVTensorHandle in, const float sigmaRange, const float sigmaSpace, NVCVTensorHandle out)

Submits the BilateralFilter operator to a CUDA stream.

Functions#

NVCVStatus pvaBilateralFilterCreate(
NVCVOperatorHandle *handle,
NVCVTensorRequirements *tensorRequirements,
const int32_t kernelSize,
const NVCVBorderType borderMode,
const int32_t borderValue,
)#

Constructs and an instance of the BilateralFilter operator.

Limitations:

Input tensor: Data Layout: [CHW], [HWC], [NCHW], [NHWC] only when C: [1] N: [1]

Data Type

Allowed

8bit Unsigned

Yes

8bit Signed

No

16bit Unsigned

No

16bit Signed

No

32bit Unsigned

No

32bit Signed

No

32bit Float

No

64bit Float

No

Output tensor: Data Layout: [CHW], [HWC], [NCHW], [NHWC] only when C: [1] N: [1]

Data Type

Allowed

8bit Unsigned

Yes

8bit Signed

No

16bit Unsigned

No

16bit Signed

No

32bit Unsigned

No

32bit Signed

No

32bit Float

No

64bit Float

No

Input/Output dependency

Property

Input == Output

Data Layout

Yes

Data Type

Yes

Number

Yes

Channels

Yes

Width

Yes

Height

Yes

Parameters

 kernelSize = 3 or 5 or 7
 borderMode = NVCV_BORDER_CONSTANT or NVCV_BORDER_REPLICATE

Parameters:
  • handle[out] Where the operator instance handle will be written to.

    • Must not be NULL.

  • tensorRequirements[in] Pointer to the NVCVTensorRequirements structure which contains Tensor rank, shape, layout and data type information.

  • kernelSize[in] The size (width and height) of filter kernel.

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

  • borderValue[in] Constant border value to be used when borderMode is NVCV_BORDER_CONSTANT. Ignored otherwise.

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 pvaBilateralFilterSubmit(
NVCVOperatorHandle handle,
cupvaStream_t stream,
NVCVTensorHandle in,
const float sigmaRange,
const float sigmaSpace,
NVCVTensorHandle out,
)#

Submits the BilateralFilter 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 tensor handle.

  • sigmaRange[in] Standard deviation in color space. Must be > 0.

  • sigmaSpace[in] Standard deviation in the coordinate space. Must be > 0.

  • out[out] Output tensor 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 pvaBilateralFilterSubmit(
NVCVOperatorHandle handle,
cudaStream_t stream,
NVCVTensorHandle in,
const float sigmaRange,
const float sigmaSpace,
NVCVTensorHandle out,
)#

Submits the BilateralFilter 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 tensor handle.

  • sigmaRange[in] Standard deviation in color space.

  • sigmaSpace[in] Standard deviation in the coordinate space.

  • out[out] Output tensor 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.