DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

Clusterer Interface

Detailed Description

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

Data Structures

struct  dwClustererParams
 

Typedefs

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

Functions

DW_API_PUBLIC dwStatus dwClusterer_bindInput (dwRectf const *const *const boxes, float32_t const *const *const weights, uint32_t const *const boxesCount, dwClustererHandle_t const obj)
 Binds the input for clusterer. More...
 
DW_API_PUBLIC dwStatus dwClusterer_bindOutput (int32_t **const clusterLabels, uint32_t *const clusterLabelsCount, uint32_t *const clusterCount, dwClustererHandle_t const obj)
 Bind the ouput of the clusterer to list of cluster labels. More...
 
DW_API_PUBLIC dwStatus dwClusterer_initialize (dwClustererHandle_t *const obj, dwClustererParams const *const clustererParams, dwContextHandle_t const ctx)
 Initializes a Clusterer module. More...
 
DW_API_PUBLIC dwStatus dwClusterer_initParams (dwClustererParams *const clustererParams)
 Initializes Clusterer parameters with default values. More...
 
DW_API_PUBLIC dwStatus dwClusterer_process (dwClustererHandle_t const 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 const obj)
 Releases the Clusterer module. More...
 
DW_API_PUBLIC dwStatus dwClusterer_reset (dwClustererHandle_t const 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 74 of file Clusterer.h.

Function Documentation

◆ dwClusterer_bindInput()

DW_API_PUBLIC dwStatus dwClusterer_bindInput ( dwRectf const *const *const  boxes,
float32_t const *const *const  weights,
uint32_t const *const  boxesCount,
dwClustererHandle_t const  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 **const  clusterLabels,
uint32_t *const  clusterLabelsCount,
uint32_t *const  clusterCount,
dwClustererHandle_t const  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 *const  obj,
dwClustererParams const *const  clustererParams,
dwContextHandle_t const  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 *const  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 const  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 const  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 const  obj)

Resets the Clusterer module.

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