DriveWorks SDK Reference

| 0.6.67 Release

ObjectClustering

Detailed Description

Defines ObjectClustering module for object clustering.

Data Structures

struct  dwDBScanClusteringParams
 
struct  dwObjectClusteringParams
 

Typedefs

typedef struct dwObjectClusteringObject * dwObjectClusteringHandle_t
 Handle to an ObjectClustering. More...
 

Enumerations

enum  dwObjectClusteringAlgorithm { DW_CLUSTERING_DBSCAN }
 

Functions

DW_API_PUBLIC dwStatus dwObjectClustering_cluster (dwObject *clusters, size_t *numClusters, const dwObject *detections, size_t numDetections, dwObjectClusteringHandle_t obj)
 Performs clustering. More...
 
DW_API_PUBLIC dwStatus dwObjectClustering_enableATHR (dwBool enable, dwObjectClusteringHandle_t obj)
 Enables or disables Area-To-Hit-Ratio filtering. More...
 
DW_API_PUBLIC dwStatus dwObjectClustering_getATHRThreshold (float32_t *threshold, dwObjectClusteringHandle_t obj)
 Returns current Area-To-Hit-Ratio threshold. More...
 
DW_API_PUBLIC dwStatus dwObjectClustering_getDBScanParameters (dwDBScanClusteringParams *dbscanParams, dwObjectClusteringHandle_t obj)
 Returns current DBScan clustering parameters. More...
 
DW_API_PUBLIC dwStatus dwObjectClustering_initDefaultParams (dwObjectClusteringParams *clusteringParams)
 Initializes ObjectClustering parameters with default values. More...
 
DW_API_PUBLIC dwStatus dwObjectClustering_initialize (dwObjectClusteringHandle_t *obj, dwContextHandle_t ctx, const dwObjectClusteringParams *clusteringParams)
 Initializes an ObjectClustering module. More...
 
DW_API_PUBLIC dwStatus dwObjectClustering_isATHREnabled (dwBool *enabled, dwObjectClusteringHandle_t obj)
 Returns a boolean indicating whether Area-To-Hit-Ratio filtering is enabled. More...
 
DW_API_PUBLIC dwStatus dwObjectClustering_release (dwObjectClusteringHandle_t *obj)
 Release ObjectClustering. More...
 
DW_API_PUBLIC dwStatus dwObjectClustering_reset (dwObjectClusteringHandle_t obj)
 Resets ObjectClustering. More...
 
DW_API_PUBLIC dwStatus dwObjectClustering_setATHRThreshold (float32_t threshold, dwObjectClusteringHandle_t obj)
 Sets Area-To-Hit-Ratio threshold. More...
 
DW_API_PUBLIC dwStatus dwObjectClustering_setDBScanParameters (const dwDBScanClusteringParams *dbscanParams, dwObjectClusteringHandle_t obj)
 Sets DBScan clustering parameters. More...
 

Data Structure Documentation

◆ dwDBScanClusteringParams

struct dwDBScanClusteringParams
Data Fields
float32_t epsilon Maximum distance from the core box to be considered within a region. Default value is 0.4.
uint32_t minBoxes Minimum number of boxes required to form a dense region.

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

float32_t minSumOfConfidences Minimum sum of confidences required to form a dense region.

minBoxes and minSumOfConfidences are checked conjunctively. Default value is 0.

◆ dwObjectClusteringParams

struct dwObjectClusteringParams
Data Fields
dwObjectClusteringAlgorithm algorithm Clustering algorithm. Default value is DW_CLUSTERING_DBSCAN.
dwDBScanClusteringParams dbScanClusteringParams DBScan clustering parameters.
dwBool enable2_5D Take the 2.5D fields (horizontalVisibility, bottomVisibility, orientationYaw) into account when clustering.
dwBool enableATHRFilter Boolean indicating whether Area-To-Hit-Ratio filter is enabled.

ATHR is calculated as: ATHR = sqrt(clusterArea) / nObjectsInCluster. Default value is DW_FALSE.

uint32_t maxClusters Maximum number of clusters (if clusters exceed this number, they are truncated). Default value is 100.
uint32_t maxProposals Maximum number of object proposals that is given at once for clustering. Default value is 100.
float32_t minHeight Minimum required clustered object height.
float32_t thresholdATHR Area to hit ratio threshold. Default value is 60.

Typedef Documentation

◆ dwObjectClusteringHandle_t

typedef struct dwObjectClusteringObject* dwObjectClusteringHandle_t

Handle to an ObjectClustering.

Definition at line 96 of file Clustering.h.

Enumeration Type Documentation

◆ dwObjectClusteringAlgorithm

Enumerator
DW_CLUSTERING_DBSCAN 

DBScan clustering.

Definition at line 56 of file Clustering.h.

Function Documentation

◆ dwObjectClustering_cluster()

DW_API_PUBLIC dwStatus dwObjectClustering_cluster ( dwObject clusters,
size_t *  numClusters,
const dwObject detections,
size_t  numDetections,
dwObjectClusteringHandle_t  obj 
)

Performs clustering.

Parameters
[out]clustersList where clustered object result are stored.
[out]numClustersNumber of resulting clustered objects.
[in]detectionsList of objects that are clustered.
[in]numDetectionsNumber of input objects.
[in]objA pointer to the object handle to release.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
Note
In DW_CLUSTERING_DBSCAN clustering, the confidence value of an output object is the sum of confidence values of all its members. Therefore, its range is not guaranteed to be [0,1].
In DW_CLUSTERING_DRIVENET clustering, the confidence value of an output object is determined to be in [0,1].

◆ dwObjectClustering_enableATHR()

DW_API_PUBLIC dwStatus dwObjectClustering_enableATHR ( dwBool  enable,
dwObjectClusteringHandle_t  obj 
)

Enables or disables Area-To-Hit-Ratio filtering.

Parameters
[in]enableBoolean indicating whether ATHR should be enabled or disabled.
[in]objA pointer to the object handle to release.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwObjectClustering_getATHRThreshold()

DW_API_PUBLIC dwStatus dwObjectClustering_getATHRThreshold ( float32_t threshold,
dwObjectClusteringHandle_t  obj 
)

Returns current Area-To-Hit-Ratio threshold.

Parameters
[out]thresholdATHR threshold
[in]objA pointer to the object handle to release.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwObjectClustering_getDBScanParameters()

DW_API_PUBLIC dwStatus dwObjectClustering_getDBScanParameters ( dwDBScanClusteringParams dbscanParams,
dwObjectClusteringHandle_t  obj 
)

Returns current DBScan clustering parameters.

Parameters
[out]dbscanParamsDBScan clustering parameters
[in]objA pointer to the object handle to release.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwObjectClustering_initDefaultParams()

DW_API_PUBLIC dwStatus dwObjectClustering_initDefaultParams ( dwObjectClusteringParams clusteringParams)

Initializes ObjectClustering parameters with default values.

Parameters
[out]clusteringParamsObjectClustering parameters.
Returns
DW_SUCCESS, DW_INVALID_ARGUMENT

◆ dwObjectClustering_initialize()

DW_API_PUBLIC dwStatus dwObjectClustering_initialize ( dwObjectClusteringHandle_t obj,
dwContextHandle_t  ctx,
const dwObjectClusteringParams clusteringParams 
)

Initializes an ObjectClustering module.

Parameters
[out]objA pointer to the ObjectClustering handle.
[in]ctxSpecifies the handler to the context under which the ObjectClustering module is created.
[in]clusteringParamsClustering parameters.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS

◆ dwObjectClustering_isATHREnabled()

DW_API_PUBLIC dwStatus dwObjectClustering_isATHREnabled ( dwBool enabled,
dwObjectClusteringHandle_t  obj 
)

Returns a boolean indicating whether Area-To-Hit-Ratio filtering is enabled.

Parameters
[out]enabledBoolean indicating whether ATHR is enabled.
[in]objA pointer to the object handle to release.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwObjectClustering_release()

DW_API_PUBLIC dwStatus dwObjectClustering_release ( dwObjectClusteringHandle_t obj)

Release ObjectClustering.

Parameters
[in]objA pointer to the object handle to release.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
Note
This method renders the handle unusable.

◆ dwObjectClustering_reset()

DW_API_PUBLIC dwStatus dwObjectClustering_reset ( dwObjectClusteringHandle_t  obj)

Resets ObjectClustering.

Parameters
[in]objSpecifies the ObjectClustering handle to reset.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwObjectClustering_setATHRThreshold()

DW_API_PUBLIC dwStatus dwObjectClustering_setATHRThreshold ( float32_t  threshold,
dwObjectClusteringHandle_t  obj 
)

Sets Area-To-Hit-Ratio threshold.

Parameters
[in]thresholdATHR threshold
[in]objA pointer to the object handle to release.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwObjectClustering_setDBScanParameters()

DW_API_PUBLIC dwStatus dwObjectClustering_setDBScanParameters ( const dwDBScanClusteringParams dbscanParams,
dwObjectClusteringHandle_t  obj 
)

Sets DBScan clustering parameters.

Parameters
[in]dbscanParamsDBScan clustering parameters
[in]objA pointer to the object handle to release.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT