VPI - Vision Programming Interface

2.2 Release

ORB feature

Runs the orb algorithm over the input image. More...

Data Structures

struct  VPIORBParams
 Structure that defines the parameters for both vpiCreateORBFeatureDetector and vpiSubmitORBFeatureDetector. More...
 

Functions

VPIStatus vpiInitORBParams (VPIORBParams *params)
 Initializes VPIORBParams with default values. More...
 
VPIStatus vpiCreateORBFeatureDetector (uint64_t backends, size_t capacity, VPIPayload *payload)
 Creates a ORB payload. More...
 
VPIStatus vpiSubmitORBFeatureDetector (VPIStream stream, uint64_t backend, VPIPayload payload, VPIPyramid input, VPIArray outCorners, VPIArray outDescriptors, const VPIORBParams *params, VPIBorderExtension border)
 Submits a ORB operation to the stream. More...
 

Detailed Description

Runs the orb algorithm over the input image.

Refer to ORB feature detector for more details and usage examples.


Data Structure Documentation

◆ VPIORBParams

struct VPIORBParams

Structure that defines the parameters for both vpiCreateORBFeatureDetector and vpiSubmitORBFeatureDetector.

Definition at line 83 of file ORB.h.

+ Collaboration diagram for VPIORBParams:
Data Fields
uint8_t enableRBRIEF Whether or not to enable rBRIEF (rotationally invariant BRIEF).

Disabling this makes it non-rotationally invariant but calculated faster.

VPIFASTCornerDetectorParams fastParams Parameters for oFAST implementation.
int32_t maxFeatures The maximum number of features alloted per level of the scale pyramid.
int32_t pyramidLevels The number of levels in the scale pyramid to utilize.

Must be the same level as passed to the Pyramid.

VPICornerScore scoreType The scoring criteria for ordering the top N FAST corners.

Defaults to Harris Corner value.

Function Documentation

◆ vpiCreateORBFeatureDetector()

VPIStatus vpiCreateORBFeatureDetector ( uint64_t  backends,
size_t  capacity,
VPIPayload payload 
)

#include </opt/nvidia/vpi2/include/vpi/algo/ORB.h>

Creates a ORB payload.

This function allocates all temporary memory needed by the algorithm.

Parameters
[in]backendsVPI backends that are eligible to execute the algorithm.
[in]capacityCapacity of the internal buffer used to store FAST corners (the maximum number of FAST corners detected before filtering).
[out]payloadPointer to the payload variable that receives the created handle.
Return values
VPI_ERROR_INVALID_ARGUMENTpayload is NULL.
VPI_ERROR_INVALID_ARGUMENTinputWidth or inputHeight outside valid range.
VPI_ERROR_INVALID_ARGUMENTbackends refers to an invalid backend.
VPI_ERROR_INVALID_OPERATIONBackend hardware not available.
VPI_ERROR_NOT_IMPLEMENTEDORB algorithm is not supported by given backend.
VPI_ERROR_INVALID_CONTEXTCurrent context is destroyed.
VPI_ERROR_OUT_OF_MEMORYCannot allocate required resources.
VPI_ERROR_INVALID_OPERATIONBackend isn't enabled in current context.
VPI_SUCCESSOperation executed successfully.

◆ vpiInitORBParams()

VPIStatus vpiInitORBParams ( VPIORBParams params)

#include </opt/nvidia/vpi2/include/vpi/algo/ORB.h>

Initializes VPIORBParams with default values.

Default values are:

  • params.fastParams.circleRadius: 3
  • params.fastParams.arcLength: 9
  • params.fastParams.intensityThreshold: 20
  • params.fastParams.nonMaxSuppression: 1
  • params.maxFeatures: 100
  • params.pyramidLevels: 4 //Set this parameter to the value in the Pyramid
  • params.enableRBRIEF: true
  • params.scoreType: VPI_CORNER_SCORE_HARRIS;
Return values
VPI_ERROR_INVALID_ARGUMENTparams is NULL.
VPI_SUCCESSOperation executed successfully.

◆ vpiSubmitORBFeatureDetector()

VPIStatus vpiSubmitORBFeatureDetector ( VPIStream  stream,
uint64_t  backend,
VPIPayload  payload,
VPIPyramid  input,
VPIArray  outCorners,
VPIArray  outDescriptors,
const VPIORBParams params,
VPIBorderExtension  border 
)

#include </opt/nvidia/vpi2/include/vpi/algo/ORB.h>

Submits a ORB operation to the stream.

Parameters
[in]streamThe stream where the operation will be queued in.
  • Must not be NULL.
  • Stream must have enabled the backends that will execute the algorithm.
[in]backendBackend that will execute the algorithm.
[in]payloadPayload to be submitted along the other parameters.
[in]inputInput Image Pyramid on which ORB will be executed.
[out]outCornersArray that will receive the detected corners. Array size is updated with the number of corners found.
  • Must not be NULL.
  • It must have type VPI_ARRAY_TYPE_KEYPOINT_F32.
  • Array must have enabled the backends that will execute the algorithm.
[out]outDescriptorsArray that will receive the descriptors for the corners Array size is updated with the number of corners found.
  • Must not be NULL.
  • It must have type VPI_ARRAY_TYPE_KEYPOINT_F32.
  • Array must have enabled the backends that will execute the algorithm.
[in]paramsPointer to a VPIORBParams. It defines the parameters for this algorithm invocation. These parameters can vary in every call and will be copied internally. Thus there is no need to keep the parameters object around.
[in]borderHow to handle pixels outside image boundaries. Set this value to the same value as the one in vpiSubmitGaussianPyramidGenerator.
Return values
VPI_ERROR_INVALID_ARGUMENTstream is NULL.
VPI_ERROR_INVALID_ARGUMENTinput or outCorners are NULL.
VPI_ERROR_INVALID_ARGUMENTCircle radius in params outside valid range.
VPI_ERROR_INVALID_ARGUMENTArc length in params outside valid range.
VPI_ERROR_INVALID_ARGUMENTIntensity threshold in params outside valid range.
VPI_ERROR_INVALID_ARRAY_TYPEInvalid outCorners array type.
VPI_ERROR_INVALID_IMAGE_FORMATUnsupported input format.
VPI_ERROR_INVALID_OPERATIONThe needed backends aren't enabled in stream, input or outCorners.
VPI_SUCCESSOperation executed successfully.