MedianFilter#
Functions#
- NVCVStatus pvaMedianFilterCreate(NVCVOperatorHandle *handle, NVCVImageRequirements *inImageRequirements, NVCVTensorRequirements *kernelRequirements, NVCVImageRequirements *outImageRequirements, NVCVBorderType borderType, int32_t borderValue)
Constructs an instance of the MedianFilter operator.
- NVCVStatus pvaMedianFilterSubmit(NVCVOperatorHandle handle, cupvaStream_t stream, NVCVImageHandle in, NVCVTensorHandle kernel, NVCVImageHandle out)
Executes the median filter operation.
Functions#
- NVCVStatus pvaMedianFilterCreate(
- NVCVOperatorHandle *handle,
- NVCVImageRequirements *inImageRequirements,
- NVCVTensorRequirements *kernelRequirements,
- NVCVImageRequirements *outImageRequirements,
- NVCVBorderType borderType,
- int32_t borderValue,
Constructs an instance of the MedianFilter operator.
Limitations:
Input: Image sizes and formats are specified in inImageRequirements.
Image Format
Allowed
U8
Yes
S8
Yes
U16
Yes
S16
Yes
Y8
Yes
Y8_ER
Yes
Y16
Yes
Y16_ER
Yes
U32
Yes
S32
Yes
2S16
Yes
Output: Image sizes and formats are specified in outImageRequirements.
Input/Output Dependency:
Property
Input == Output
Width
Yes
Height
Yes
Format
Yes
Kernel Size:
Kernel Size
Allowed
3x3
Yes
5x5
Yes
5x7
Yes
11x11
No
Kernel Type:
Kernel Type
Allowed
Box
Yes
Cross
No
Checkered
No
Border Type:
Border Type
Allowed
Zero
Yes
Clamp
Yes
Mirror
No
Reflect
No
Limited
No
Parameters
- Parameters:
handle – [out] Where the operator instance handle will be written to.
Must not be NULL.
inImageRequirements – [in] Pointer to the input image NVCVImageRequirements structure which contains image shape, strides, and format information.
kernelRequirements – [in] Pointer to the kernel tensor NVCVTensorRequirements structure which contains tensor layout, rank, shape, and strides information.
Data Layout: [HW]
Data Type: NVCV_DATA_TYPE_S8
outImageRequirements – [in] Pointer to the output image NVCVImageRequirements structure which contains image shape, strides, and format information.
borderType – [in] Border type to use.
borderValue – [in] Border value to use for NVCV_BORDER_CONSTANT.
- 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 pvaMedianFilterSubmit(
- NVCVOperatorHandle handle,
- cupvaStream_t stream,
- NVCVImageHandle in,
- NVCVTensorHandle kernel,
- NVCVImageHandle out,
Executes the median filter 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.
kernel – [in] Kernel data tensor 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.