BlurFilterROI#
Functions#
- NVCVStatus pvaBlurFilterROICreate(NVCVOperatorHandle *handle, NVCVImageRequirements const *const inImageRequirements, NVCVImageRequirements const *const outImageRequirements, NVCVTensorRequirements const *const rectTensorRequirements, const NVCVSize2D blockSize)
Constructs an instance of the BlurFilterROI operator.
- NVCVStatus pvaBlurFilterROISubmit(NVCVOperatorHandle handle, cupvaStream_t stream, NVCVImageHandle const in, NVCVImageHandle out, NVCVTensorHandle const rect, const size_t numRects)
Executes the BlurFilterROI operation on images.
Functions#
- NVCVStatus pvaBlurFilterROICreate(
- NVCVOperatorHandle *handle,
- NVCVImageRequirements const *const inImageRequirements,
- NVCVImageRequirements const *const outImageRequirements,
- NVCVTensorRequirements const *const rectTensorRequirements,
- const NVCVSize2D blockSize,
Constructs an instance of the BlurFilterROI operator.
Limitations:
The maximum supported width and height of ROI rectangle is 256 pixels. The maximum supported number of ROI rectangles is 256. The ROI rectangles are assumed inside the image. There is no checking or error handling due to the performance reason.
Input: Image Format: NVCV_IMAGE_FORMAT_NV12, NVCV_IMAGE_FORMAT_NV12_ER, NVCV_IMAGE_FORMAT_NV12_BL or NVCV_IMAGE_FORMAT_NV12_ER_BL
Output: Image Format: NVCV_IMAGE_FORMAT_NV12, NVCV_IMAGE_FORMAT_NV12_ER, NVCV_IMAGE_FORMAT_NV12_BL or NVCV_IMAGE_FORMAT_NV12_ER_BL
Input/Output Dependency:
Property
Input == Output
Width
Yes
Height
Yes
Image format
No
- 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 input image width, height and format information. This structure must be filled by using nvcvImageCalcRequirementsPva().
outImageRequirements – [in] Pointer to the NVCVImageRequirements structure which contains output image width, height and format information. This structure must be filled by using nvcvImageCalcRequirementsPva().
rectTensorRequirements – [in] Pointer to the NVCVTensorRequirements structure which contains Tensor rank, shape, layout and data type information. This structure must be filled by using nvcvTensorCalcRequirementsPva(). The tensor should be a 1D tensor (rank=1) and the data type should correspond to NVCV_DATA_TYPE_4S32.
blockSize – [in] The size of width and height to be used when splitting the ROI rectangle into multiple blocks. For each ROI rectangle, the blur filter will use the value on the top-left corner of the block to fill in the whole block.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – Handle is null or some parameter is outside valid range.
NVCV_ERROR_OUT_OF_MEMORY – Not enough memory to create the operator.
NVCV_ERROR_INVALID_IMAGE_FORMAT – Image format is invalid.
NVCV_SUCCESS – Operation executed successfully.
- NVCVStatus pvaBlurFilterROISubmit(
- NVCVOperatorHandle handle,
- cupvaStream_t stream,
- NVCVImageHandle const in,
- NVCVImageHandle out,
- NVCVTensorHandle const rect,
- const size_t numRects,
Executes the BlurFilterROI operation on images.
- 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.
rect – [in] Input tensor handle to store ROI rectangles. Each element in the tensor is an NVCVRectI structure, representing {x, y, width, height} in NVCV_DATA_TYPE_4S32 datatype.
numRects – [in] Input variable to store number of ROI rectangles.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – Handle is null.
NVCV_ERROR_INTERNAL – Internal error in the operator, invalid types passed in.
NVCV_SUCCESS – Operation executed successfully.