GaussianPyramid#
Functions#
- NVCVStatus pvaGaussianPyramidCreate(NVCVOperatorHandle *handle, NVCVImageRequirements const *const inputImageRequirements, const int32_t numLevels, const NVCVBorderType borderMode, const int32_t borderValue)
Constructs an instance of the GaussianPyramid operator.
- NVCVStatus pvaGaussianPyramidSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVImageHandle inImageHandle, NVCVImageHandle *outImageHandles)
Submits the GaussianPyramid operator to a CUDA stream.
- NVCVStatus pvaGaussianPyramidSubmit(NVCVOperatorHandle handle, cupvaStream_t stream, NVCVImageHandle inImageHandle, NVCVImageHandle *outImageHandles)
Submits the GaussianPyramid operator to a cuPVA stream.
Functions#
- NVCVStatus pvaGaussianPyramidCreate(
- NVCVOperatorHandle *handle,
- NVCVImageRequirements const *const inputImageRequirements,
- const int32_t numLevels,
- const NVCVBorderType borderMode,
- const int32_t borderValue,
Constructs an instance of the GaussianPyramid operator.
Limitations:
Input/Output:
Image format
Allowed
NVCV_IMAGE_FORMAT_U8
Yes
NVCV_IMAGE_FORMAT_S8
Yes
NVCV_IMAGE_FORMAT_Y8
Yes
NVCV_IMAGE_FORMAT_Y8_ER
Yes
NVCV_IMAGE_FORMAT_U16
Yes
NVCV_IMAGE_FORMAT_S16
Yes
NVCV_IMAGE_FORMAT_Y16
Yes
NVCV_IMAGE_FORMAT_Y16_ER
Yes
The order of returned output image pyramid is from high to low resolution (fine to coarse). Each pyramid level has half the width and height of the previous level (downsampled by a factor of 2).
Image size constraints:
The minimum supported width and height of input image is 2x4 pixels.
Image height modulo tile height cannot be 1.
The function will return an error if the input image is too small or violates the height constraint.
Gaussian kernel: The Gaussian kernel size only supports 5x5. The implemented 5x5 Gaussian kernel is: | 1 4 6 4 1 | | 4 16 24 16 4 | | 6 24 36 24 6 | | 4 16 24 16 4 | | 1 4 6 4 1 |
Parameters: numLevels:
The supported range of pyramid levels is 2-3.
Level 0 is a copy of the input image.
For numLevels=2: returns level 0 (input copy) and level 1 (downsampled).
For numLevels=3: returns level 0 (input copy), level 1, and level 2 (both downsampled).
borderMode:
NVCV_BORDER_CONSTANT
borderValue:
Must be 0.
- Parameters:
handle – [out] Where the operator instance handle will be written to.
Must not be NULL.
inputImageRequirements – [in] Pointer to the NVCVImageRequirements structure which contains input image width, height and format information.
numLevels – [in] Number of pyramid levels to compute.
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.
- 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 pvaGaussianPyramidSubmit(
- NVCVOperatorHandle handle,
- cudaStream_t stream,
- NVCVImageHandle inImageHandle,
- NVCVImageHandle *outImageHandles,
Submits the GaussianPyramid 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.
inImageHandle – [in] Input image handle.
outImageHandles – [out] Pointer to array of output images.
- 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.
- NVCVStatus pvaGaussianPyramidSubmit(
- NVCVOperatorHandle handle,
- cupvaStream_t stream,
- NVCVImageHandle inImageHandle,
- NVCVImageHandle *outImageHandles,
Submits the GaussianPyramid operator to a cuPVA stream.
- Parameters:
handle – [in] Handle to the operator.
Must not be NULL.
stream – [in] Handle to a valid cuPVA stream.
inImageHandle – [in] Input image handle.
outImageHandles – [out] Pointer to array of output images.
The size of the array is equal to numLevels.
- 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.