DriveWorks SDK Reference
5.16.65 Release
For Test and Development only

Feature 2D Descriptor Interface

Detailed Description

Defines 2D-based feature description.

Data Structures

struct  dwFeature2DDescriptorConfig
 Holds configuration parameters for a feature descriptor. More...
 

Typedefs

typedef struct dwFeature2DDescriptorObject const * dwConstFeature2DDescriptorHandle_t
 Handle representing a const feature descriptor. More...
 
typedef struct dwFeature2DDescriptorObject * dwFeature2DDescriptorHandle_t
 Handle representing a feature descriptor. More...
 

Enumerations

enum  dwFeature2DDescriptorAlgorithm { DW_FEATURE2D_DESCRIPTOR_ALGORITHM_ORB = 0 }
 Feature descriptor algorithm. More...
 
enum  dwFeature2DDescriptorStage {
  DW_FEATURE2D_DESCRIPTOR_STAGE_GPU_ASYNC = 0 ,
  DW_FEATURE2D_DESCRIPTOR_STAGE_CPU_SYNC ,
  DW_FEATURE2D_DESCRIPTOR_STAGE_PVA_ASYNC ,
  DW_FEATURE2D_DESCRIPTOR_STAGE_CPU_SYNC_POSTPROCESS ,
  DW_FEATURE2D_DESCRIPTOR_STAGE_GPU_ASYNC_POSTPROCESS
}
 The stage of feature descriptor. More...
 

Functions

DW_API_PUBLIC dwStatus dwFeature2DDescriptor_bindBuffers (dwImageHandle_t image, const dwFeatureArray *features, dwFeature2DDescriptorHandle_t obj)
 Binds input parameters to descriptor object. More...
 
DW_API_PUBLIC dwStatus dwFeature2DDescriptor_bindOutput (dwFeatureDescriptorArray *outputDescriptors, dwFeature2DDescriptorHandle_t obj)
 Binds output dwFeatureDescriptorArray to descriptor object. More...
 
DW_API_PUBLIC dwStatus dwFeature2DDescriptor_getCUDAStream (cudaStream_t *stream, dwConstFeature2DDescriptorHandle_t obj)
 Gets the CUDA stream used by the feature descriptor. More...
 
DW_API_PUBLIC dwStatus dwFeature2DDescriptor_getPVAStream (cupvaStream_t *stream, dwConstFeature2DDescriptorHandle_t obj)
 Gets the CUPVA stream used by the feature Descriptor. More...
 
DW_API_PUBLIC dwStatus dwFeature2DDescriptor_initDefaultParams (dwFeature2DDescriptorConfig *params)
 Initializes dwFeature2DDescriptor parameters with default values. More...
 
DW_API_PUBLIC dwStatus dwFeature2DDescriptor_initialize (dwFeature2DDescriptorHandle_t *obj, const dwFeature2DDescriptorConfig *config, cudaStream_t cudaStream, dwContextHandle_t context)
 Creates and initializes a feature descriptor. More...
 
DW_API_PUBLIC dwStatus dwFeature2DDescriptor_processImage (dwFeature2DDescriptorStage stage, dwFeature2DDescriptorHandle_t obj)
 Do detections on the image bound by dwFeature2DDescriptor_bindInputImage, output will be written to dwFeatureDescriptorArray bound by dwFeature2DDescriptor_bindOutput. More...
 
DW_API_PUBLIC dwStatus dwFeature2DDescriptor_release (dwFeature2DDescriptorHandle_t obj)
 Releases the feature descriptor. More...
 
DW_API_PUBLIC dwStatus dwFeature2DDescriptor_reset (dwFeature2DDescriptorHandle_t obj)
 Resets a feature descriptor. More...
 
DW_API_PUBLIC dwStatus dwFeature2DDescriptor_setCUDAStream (cudaStream_t stream, dwFeature2DDescriptorHandle_t obj)
 Sets the CUDA stream for CUDA related operations. More...
 
DW_API_PUBLIC dwStatus dwFeature2DDescriptor_setPVAStream (cupvaStream_t stream, dwFeature2DDescriptorHandle_t obj)
 Sets the CUPVA stream for PVA related operations. More...
 

Data Structure Documentation

◆ dwFeature2DDescriptorConfig

struct dwFeature2DDescriptorConfig
Data Fields
dwFeature2DDescriptorAlgorithm algorithm Detecting algorithm defined by dwFeature2DDescriptorType
uint32_t imageHeight Height of the images in pixels that the descriptor runs on.
uint32_t imageWidth Width of the images in pixels that the Descriptor runs on.
uint32_t maxFeatureCount Upper bound on number of features handled.
dwProcessorType processorType for DW_FEATURE2D_DESCRIPTOR_ALGORITHM_ORB only set to DW_PROCESSOR_TYPE_PVA_0 to call PVA orb descriptor.

Typedef Documentation

◆ dwConstFeature2DDescriptorHandle_t

typedef struct dwFeature2DDescriptorObject const* dwConstFeature2DDescriptorHandle_t

Handle representing a const feature descriptor.

Definition at line 70 of file FeatureDescriptor.h.

◆ dwFeature2DDescriptorHandle_t

typedef struct dwFeature2DDescriptorObject* dwFeature2DDescriptorHandle_t

Handle representing a feature descriptor.

Definition at line 65 of file FeatureDescriptor.h.

Enumeration Type Documentation

◆ dwFeature2DDescriptorAlgorithm

Feature descriptor algorithm.

Enumerator
DW_FEATURE2D_DESCRIPTOR_ALGORITHM_ORB 

enum for selecting ORB descriptor

Definition at line 75 of file FeatureDescriptor.h.

◆ dwFeature2DDescriptorStage

The stage of feature descriptor.

Enumerator
DW_FEATURE2D_DESCRIPTOR_STAGE_GPU_ASYNC 

GPU Async stage.

DW_FEATURE2D_DESCRIPTOR_STAGE_CPU_SYNC 

CPU preprocess.

DW_FEATURE2D_DESCRIPTOR_STAGE_PVA_ASYNC 

PVA Process.

DW_FEATURE2D_DESCRIPTOR_STAGE_CPU_SYNC_POSTPROCESS 

CPU Post process.

DW_FEATURE2D_DESCRIPTOR_STAGE_GPU_ASYNC_POSTPROCESS 

Process the postprocess part of the feature descriptor pipeline on CPU.

Definition at line 117 of file FeatureDescriptor.h.

Function Documentation

◆ dwFeature2DDescriptor_bindBuffers()

DW_API_PUBLIC dwStatus dwFeature2DDescriptor_bindBuffers ( dwImageHandle_t  image,
const dwFeatureArray features,
dwFeature2DDescriptorHandle_t  obj 
)

Binds input parameters to descriptor object.

Parameters
[in]imageSpecifies the image on which feature detection takes place, must be a CUDA image.
[in,out]featuresFeatures whose descriptor to be calculated.
[in]objSpecifies the feature descriptor handle.
Returns
DW_INVALID_ARGUMENT if descriptor handle, features or image are NULL.
DW_INVALID_ARGUMENT if features are not allocated on GPU.
DW_NOT_SUPPORTED if platform does not support.
DW_SUCCESS otherwise.
Note
dwFeature2DDescriptor_bindInputImage must be called at least once before dwFeature2DDescriptor_processImage.

◆ dwFeature2DDescriptor_bindOutput()

DW_API_PUBLIC dwStatus dwFeature2DDescriptor_bindOutput ( dwFeatureDescriptorArray outputDescriptors,
dwFeature2DDescriptorHandle_t  obj 
)

Binds output dwFeatureDescriptorArray to descriptor object.

Parameters
[out]outputDescriptorsFeature descriptor array containing the calculated feature descriptors features. Must be created by dwFeatureDescriptorArray_create() with DW_PROCESSOR_TYPE_GPU flag and the same maxFeatureCount when initializing descriptor
[in]objSpecifies the feature descriptor handle.
Returns
DW_INVALID_ARGUMENT if descriptor handle or outputDescriptors are NULL.
DW_INVALID_ARGUMENT if outputDescriptors is not created with descriptor compatible parameters.
DW_NOT_SUPPORTED if platform does not support.
DW_SUCCESS otherwise.
Note
App must call dwFeature2DDescriptor_bindOutput to set output feature descriptor array.

◆ dwFeature2DDescriptor_getCUDAStream()

DW_API_PUBLIC dwStatus dwFeature2DDescriptor_getCUDAStream ( cudaStream_t *  stream,
dwConstFeature2DDescriptorHandle_t  obj 
)

Gets the CUDA stream used by the feature descriptor.

Parameters
[out]streamThe CUDA stream currently used.
[in]objA handle to the feature descriptor module.
Returns
DW_INVALID_ARGUMENT if feature descriptor handle or stream are NULL.
DW_NOT_SUPPORTED if platform does not support.
DW_SUCCESS otherwise.

◆ dwFeature2DDescriptor_getPVAStream()

DW_API_PUBLIC dwStatus dwFeature2DDescriptor_getPVAStream ( cupvaStream_t stream,
dwConstFeature2DDescriptorHandle_t  obj 
)

Gets the CUPVA stream used by the feature Descriptor.

Parameters
[out]streamThe CUPVA stream currently used.
[in]objA handle to the feature Descriptor module.
Returns
DW_INVALID_ARGUMENT if feature Descriptor handle or stream are NULL.
DW_NOT_AVAILABLE if not available for platform.
DW_SUCCESS otherwise.

◆ dwFeature2DDescriptor_initDefaultParams()

DW_API_PUBLIC dwStatus dwFeature2DDescriptor_initDefaultParams ( dwFeature2DDescriptorConfig params)

Initializes dwFeature2DDescriptor parameters with default values.

Parameters
[out]paramsdwFeature2DDescriptor parameters
Returns
DW_INVALID_ARGUMENT if params is NULL.
DW_SUCCESS otherwise.

◆ dwFeature2DDescriptor_initialize()

DW_API_PUBLIC dwStatus dwFeature2DDescriptor_initialize ( dwFeature2DDescriptorHandle_t obj,
const dwFeature2DDescriptorConfig config,
cudaStream_t  cudaStream,
dwContextHandle_t  context 
)

Creates and initializes a feature descriptor.

Parameters
[out]objA pointer to the feature descriptor handle is returned here.
[in]configSpecifies the configuration parameters.
[in]cudaStreamSpecifies the CUDA stream to use for descriptor operations.
[in]contextSpecifies the handle to the context under which it is created.
Returns
DW_INVALID_ARGUMENT if feature descriptor handle or context are NULL or config is invalid.
DW_NOT_SUPPORTED if platform does not support.
DW_NOT_AVAILABLE if module not available in platform.
DW_SUCCESS otherwise.

◆ dwFeature2DDescriptor_processImage()

DW_API_PUBLIC dwStatus dwFeature2DDescriptor_processImage ( dwFeature2DDescriptorStage  stage,
dwFeature2DDescriptorHandle_t  obj 
)

Do detections on the image bound by dwFeature2DDescriptor_bindInputImage, output will be written to dwFeatureDescriptorArray bound by dwFeature2DDescriptor_bindOutput.

Parameters
[in]stageSpecifies the detecting stage
[in]objSpecifies the feature descriptor handle.
Returns
DW_INVALID_ARGUMENT if there's no output dwFeatureDescriptorArray bound to descriptor.
if there's no input image or features bound to descriptor.
DW_SUCCESS otherwise.

◆ dwFeature2DDescriptor_release()

DW_API_PUBLIC dwStatus dwFeature2DDescriptor_release ( dwFeature2DDescriptorHandle_t  obj)

Releases the feature descriptor.

This method releases all resources associated with a feature descriptor.

Note
This method renders the handle unusable.
Parameters
[in]objThe feature descriptor handle to be released.
Returns
DW_INVALID_ARGUMENT if feature descriptor handle is NULL.
DW_NOT_SUPPORTED if platform does not support.
DW_SUCCESS otherwise.

◆ dwFeature2DDescriptor_reset()

DW_API_PUBLIC dwStatus dwFeature2DDescriptor_reset ( dwFeature2DDescriptorHandle_t  obj)

Resets a feature descriptor.

Parameters
[in]objSpecifies the feature descriptor handle to be reset.
Returns
DW_INVALID_ARGUMENT if feature descriptor handle is NULL.
DW_NOT_SUPPORTED if platform does not support.
DW_SUCCESS otherwise.

◆ dwFeature2DDescriptor_setCUDAStream()

DW_API_PUBLIC dwStatus dwFeature2DDescriptor_setCUDAStream ( cudaStream_t  stream,
dwFeature2DDescriptorHandle_t  obj 
)

Sets the CUDA stream for CUDA related operations.

Note
The ownership of the stream remains by the callee.
Parameters
[in]streamThe CUDA stream to be used. Default is the one passed during dwFeature2DDescriptor_initialize.
[in]objA handle to the feature descriptor module to set CUDA stream for.
Returns
DW_INVALID_ARGUMENT if feature descriptor handle is NULL.
DW_NOT_SUPPORTED if platform does not support.
DW_SUCCESS otherwise.

◆ dwFeature2DDescriptor_setPVAStream()

DW_API_PUBLIC dwStatus dwFeature2DDescriptor_setPVAStream ( cupvaStream_t  stream,
dwFeature2DDescriptorHandle_t  obj 
)

Sets the CUPVA stream for PVA related operations.

Note
The ownership of the stream remains by the callee.
Parameters
[in]streamThe CUPVA stream to be used. Default is the one passed during dwFeature2DDescriptor_initialize.
[in]objA handle to the feature Descriptor module to set CUPVA stream for.
Returns
DW_INVALID_ARGUMENT if feature Descriptor handle is NULL.
DW_NOT_AVAILABLE if not available for platform.
DW_SUCCESS otherwise.