DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

Clusterer Interface

Detailed Description

Defines the Clusterer module for performing DBSCAN clusterer on bounding boxes.

Note
SW Release Applicability: These APIs are available in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.

Data Structures

struct  dwClustererParams
 

Typedefs

typedef struct dwClustererObject * dwClustererHandle_t
 Handle to a Clusterer. More...
 

Functions

DW_API_PUBLIC dwStatus dwClusterer_bindInput (const dwRectf *const *boxes, const float32_t *const *weights, const uint32_t *boxesCount, dwClustererHandle_t obj)
 Binds the input for clusterer. More...
 
DW_API_PUBLIC dwStatus dwClusterer_bindOutput (int32_t **clusterLabels, uint32_t *clusterLabelsCount, uint32_t *clusterCount, dwClustererHandle_t obj)
 Bind the ouput of the clusterer to list of cluster labels. More...
 
DW_API_PUBLIC dwStatus dwClusterer_initialize (dwClustererHandle_t *obj, const dwClustererParams *clustererParams, dwContextHandle_t ctx)
 Initializes a Clusterer module. More...
 
DW_API_PUBLIC dwStatus dwClusterer_initParams (dwClustererParams *clustererParams)
 Initializes Clusterer parameters with default values. More...
 
DW_API_PUBLIC dwStatus dwClusterer_process (dwClustererHandle_t obj)
 Runs DBScan clusterer on given bounding boxes and returns labels for each bounding box in the same order. More...
 
DW_API_PUBLIC dwStatus dwClusterer_release (dwClustererHandle_t obj)
 Releases the Clusterer module. More...
 
DW_API_PUBLIC dwStatus dwClusterer_reset (dwClustererHandle_t obj)
 Resets the Clusterer module. More...
 

Data Structure Documentation

◆ dwClustererParams

struct dwClustererParams
Data Fields
float32_t epsilon Maximum distance from the core box to be considered within a region. Default value is 0.4.
uint32_t maxSampleCount Maximum number of samples that will be given as input. Default value is 100.
uint32_t minSamples Minimum number of samples required to form a dense region.

minSamples and minSumOfConfidences are checked conjunctively. Default value is 3.

float32_t minSumOfWeights Minimum sum of weights required to form a dense region.

minSamples and minSumOfWeights are checked conjunctively. Default value is 0.

Typedef Documentation

◆ dwClustererHandle_t

typedef struct dwClustererObject* dwClustererHandle_t

Handle to a Clusterer.

Definition at line 76 of file Clusterer.h.

Function Documentation

◆ dwClusterer_bindInput()

DW_API_PUBLIC dwStatus dwClusterer_bindInput ( const dwRectf *const *  boxes,
const float32_t *const *  weights,
const uint32_t *  boxesCount,
dwClustererHandle_t  obj 
)

Binds the input for clusterer.

Parameters
[in]boxesPointer to list where boxes are stored.
[in]weightsPointer to list where corresponding weights are stored.
[in]boxesCountPointer to the number of input boxes
[in]objSpecifies the Clusterer handle.
Returns
DW_INVALID_ARGUMENT if any of the arguments is NULL DW_SUCCESS

◆ dwClusterer_bindOutput()

DW_API_PUBLIC dwStatus dwClusterer_bindOutput ( int32_t **  clusterLabels,
uint32_t *  clusterLabelsCount,
uint32_t *  clusterCount,
dwClustererHandle_t  obj 
)

Bind the ouput of the clusterer to list of cluster labels.

Parameters
clusterLabelsPointer to a list to store cluster label for each input bounding box at the same index. Label values are in [-1, clusterCount) where -1 means the corresponding sample does not belong to any cluster.
clusterLabelsCountPointer to store the number of cluster labels.
clusterCountPointer to store the number of clusters.
objSpecifies the Clusterer handle.
Returns
DW_INVALID_ARGUMENT if any of the arguments is NULL DW_SUCCESS

◆ dwClusterer_initialize()

DW_API_PUBLIC dwStatus dwClusterer_initialize ( dwClustererHandle_t obj,
const dwClustererParams clustererParams,
dwContextHandle_t  ctx 
)

Initializes a Clusterer module.

Parameters
[out]objA pointer to the Clusterer handle for the created module.
[in]clustererParamsClusterer parameters.
[in]ctxSpecifies the handle to the context under which the Clusterer module is created.
Note
Clusterer parameters must be initialized using dwClusterer_initParams before modifying.
Returns
DW_INVALID_ARGUMENT if clusterer handle is NULL or clustererParams is invalid.
DW_SUCCESS

◆ dwClusterer_initParams()

DW_API_PUBLIC dwStatus dwClusterer_initParams ( dwClustererParams clustererParams)

Initializes Clusterer parameters with default values.

Parameters
[out]clustererParamsClusterer parameters.
Returns
DW_INVALID_ARGUMENT if parameters are NULL.
DW_SUCCESS

◆ dwClusterer_process()

DW_API_PUBLIC dwStatus dwClusterer_process ( dwClustererHandle_t  obj)

Runs DBScan clusterer on given bounding boxes and returns labels for each bounding box in the same order.

Parameters
[in]objSpecifies the Clusterer handle.
Note
This method requires that the input and output have already been provided by calling bindInput() and bindOutput().
Returns
DW_INVALID_ARGUMENT if clusterer handle is NULL.
DW_SUCCESS

◆ dwClusterer_release()

DW_API_PUBLIC dwStatus dwClusterer_release ( dwClustererHandle_t  obj)

Releases the Clusterer module.

Parameters
[in]objSpecifies the Clusterer handle to release.
Returns
DW_INVALID_ARGUMENT if clusterer handle is NULL.
DW_SUCCESS.
Note
This method renders the handle unusable.

◆ dwClusterer_reset()

DW_API_PUBLIC dwStatus dwClusterer_reset ( dwClustererHandle_t  obj)

Resets the Clusterer module.

Parameters
[in]objSpecifies the Clusterer handle to reset.
Returns
DW_INVALID_ARGUMENT if clusterer handle is NULL.
DW_SUCCESS.