CornerSubPix#

Functions#

NVCVStatus pvaCornerSubPixCreate(NVCVOperatorHandle *handle, NVCVTensorRequirements *cornerParams, NVCVTensorRequirements *imageParams, const NVCVSize2D winSize, const NVCVSize2D zeroZone)

Constructs an instance of the CornerSubPix operator.

NVCVStatus pvaCornerSubPixSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVTensorHandle inCorners, NVCVTensorHandle outCorners, NVCVTensorHandle image, const int32_t maxIters, const float eps, const int32_t numCorners)

Submits the CornerSubPix operator to a CUDA stream.

NVCVStatus pvaCornerSubPixSubmit(NVCVOperatorHandle handle, cupvaStream_t stream, NVCVTensorHandle inCorners, NVCVTensorHandle outCorners, NVCVTensorHandle image, const int32_t maxIters, const float eps, const int32_t numCorners)

Submits the CornerSubPix operator to a cuPVA stream.

Functions#

NVCVStatus pvaCornerSubPixCreate(
NVCVOperatorHandle *handle,
NVCVTensorRequirements *cornerParams,
NVCVTensorRequirements *imageParams,
const NVCVSize2D winSize,
const NVCVSize2D zeroZone,
)#

Constructs an instance of the CornerSubPix operator.

Limitations:

Image: 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

Corners: Data Layout: [W], [HW], [CHW], [NCHW] only when C: [1] N: [1]

Data Type

Allowed

8bit Unsigned

No

8bit Signed

No

16bit Unsigned

No

16bit Signed

No

32bit Unsigned

No

32bit Signed

No

32bit Float

Yes

64bit Float

No

Parameters:

winSize:
 - winWidth  = 3 or 4
 - winHeight = 3 or 4
 - winWidth  = winHeight
zeroZone:
 - zeroZoneWidth < winWidth
 - zeroZoneHeight < winHeight
 - negative zeroZoneWidth or zeroZoneHeight means no zeroZone

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

    • Must not be NULL.

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

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

  • winSize[in] Half of the side length of the search window.

  • zeroZone[in] Half of the size of the dead region in the middle of the search zone over which the summation is not done. It is used sometimes to avoid possible singularities of the autocorrelation matrix. The negative indicates that there is no such a size.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Handle is null.

  • NVCV_ERROR_OUT_OF_MEMORY – No enough memory to create the operator.

  • NVCV_SUCCESS – Operation executed successfully.

NVCVStatus pvaCornerSubPixSubmit(
NVCVOperatorHandle handle,
cudaStream_t stream,
NVCVTensorHandle inCorners,
NVCVTensorHandle outCorners,
NVCVTensorHandle image,
const int32_t maxIters,
const float eps,
const int32_t numCorners,
)#

Submits the CornerSubPix 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.

  • inCorners[in] Input tensor handle.

  • outCorners[out] Output tensor handle.

  • image[in] Input tensor handle.

  • maxIters[in] The process of corner position refinement stops after maxIters iterations.

  • eps[in] The process of corner position refinement stops when the corner position moves by less than eps.

  • numCorners[in] The number of corners.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside the valid range.

  • NVCV_ERROR_INTERNAL – Internal error in the operator, invalid types passed in.

  • NVCV_SUCCESS – Operation executed successfully.

NVCVStatus pvaCornerSubPixSubmit(
NVCVOperatorHandle handle,
cupvaStream_t stream,
NVCVTensorHandle inCorners,
NVCVTensorHandle outCorners,
NVCVTensorHandle image,
const int32_t maxIters,
const float eps,
const int32_t numCorners,
)#

Submits the CornerSubPix operator to a cuPVA stream.

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

    • Must not be NULL.

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

  • inCorners[in] Input tensor handle. Data Type: NVCV_DATA_TYPE_F32 Data Layout: [W], [HW], [CHW], [NCHW] only when C = 1 and N = 1

  • outCorners[out] Output tensor handle. Data Type: NVCV_DATA_TYPE_F32 Data Layout: [W], [HW], [CHW], [NCHW] only when C = 1 and N = 1

  • image[in] Input tensor handle. Data Type: NVCV_DATA_TYPE_U8 Data Layout: [CHW], [HWC], [NCHW], [NHWC] only when C = 1 and N = 1

  • maxIters[in] The process of corner position refinement stops after maxIters iterations, must >= 6.

  • eps[in] The process of corner position refinement stops when the corner position moves by less than eps on some iteration.

  • numCorners[in] The number of [in/out] corners, valid range (0, 4096].

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside the valid range.

  • NVCV_ERROR_INTERNAL – Internal error in the operator, invalid types passed in.

  • NVCV_SUCCESS – Operation executed successfully.