DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

RoadMarkClassifier Interface.

Detailed Description

Defines RoadMarkClassifier module for roadmark classification.

Defines RoadMarkClassifier module for road mark classification.

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

Data Structures

struct  dwRoadMarkClassifierParams
 

Typedefs

typedef struct dwRoadMarkClassifierObject * dwRoadMarkClassifierHandle_t
 Handle to a RoadMark classifier. More...
 

Enumerations

enum  dwRoadMarkClassifierSmoothingType {
  DW_ROADMARK_CLASSIFIER_SMOOTHING_TYPE_NONE = 0,
  DW_ROADMARK_CLASSIFIER_SMOOTHING_TYPE_CONFIDENCE_VOTING = 1
}
 
enum  dwRoadMarkClassifierStage {
  DW_ROADMARK_CLASSIFIER_STAGE_GPU_ASYNC_PREPROCESSING = 0,
  DW_ROADMARK_CLASSIFIER_STAGE_GPU_ASYNC_INFERENCE,
  DW_ROADMARK_CLASSIFIER_STAGE_GPU_ASYNC_INTERPRETATION,
  DW_ROADMARK_CLASSIFIER_STAGE_CPU_SYNC_POSTPROCESSING
}
 The GPU processing stages of the RoadMarkClassifier. More...
 

Functions

DW_API_PUBLIC dwStatus dwRoadMarkClassifier_bindInputImageArray (const dwImageCUDA *const *images, uint32_t imageCount, dwRoadMarkClassifierHandle_t obj)
 Binds a list of images that are to be processed and fed to the classifier. More...
 
DW_API_PUBLIC dwStatus dwRoadMarkClassifier_bindInputRoadmarkDetection (const dwRoadmarkDetection *roadmarks, dwRoadMarkClassifierHandle_t obj)
 Binds the output roadmarks to the classifier. More...
 
DW_API_PUBLIC dwStatus dwRoadMarkClassifier_bindOutput (dwRoadmarkDetection *roadmarks, dwRoadMarkClassifierHandle_t obj)
 Binds the output of road mark classifier. More...
 
DW_API_PUBLIC dwStatus dwRoadMarkClassifier_getCUDAStream (cudaStream_t *stream, dwRoadMarkClassifierHandle_t obj)
 Gets the CUDA stream used. More...
 
DW_API_PUBLIC dwStatus dwRoadMarkClassifier_getThreshold (float32_t *threshold, dwRoadMarkClassifierHandle_t obj)
 Gets the classification threshold used. More...
 
DW_API_PUBLIC dwStatus dwRoadMarkClassifier_initDefaultParams (dwRoadMarkClassifierParams *classifierParams)
 Initializes default params values for dwRoadMarkClassifier. More...
 
DW_API_PUBLIC dwStatus dwRoadMarkClassifier_initializeFromRoadMarkNet (dwRoadMarkClassifierHandle_t *obj, dwRoadMarkNetHandle_t roadMarkNet, const dwRoadMarkClassifierParams *classifierParams, dwContextHandle_t ctx)
 Initializes RoadMarkClassifier module with a RoadMarkNet DNN inference module. More...
 
DW_API_PUBLIC dwStatus dwRoadMarkClassifier_process (dwRoadMarkClassifierStage stage, dwRoadMarkClassifierHandle_t obj)
 Perform road mark classifier GPU stages. More...
 
DW_API_PUBLIC dwStatus dwRoadMarkClassifier_release (dwRoadMarkClassifierHandle_t obj)
 Releases the RoadMarkClassifier module. More...
 
DW_API_PUBLIC dwStatus dwRoadMarkClassifier_reset (dwRoadMarkClassifierHandle_t obj)
 Resets RoadMarkClassifier. More...
 
DW_API_PUBLIC dwStatus dwRoadMarkClassifier_setCUDAStream (cudaStream_t stream, dwRoadMarkClassifierHandle_t obj)
 Sets the CUDA stream to be used. More...
 
DW_API_PUBLIC dwStatus dwRoadMarkClassifier_setThreshold (float32_t threshold, dwRoadMarkClassifierHandle_t obj)
 Sets the classification threshold to be used. More...
 

Data Structure Documentation

◆ dwRoadMarkClassifierParams

struct dwRoadMarkClassifierParams
Data Fields
dwRoadMarkClassifierSmoothingType smoothingType

Typedef Documentation

◆ dwRoadMarkClassifierHandle_t

typedef struct dwRoadMarkClassifierObject* dwRoadMarkClassifierHandle_t

Handle to a RoadMark classifier.

Definition at line 78 of file RoadMarkClassifier.h.

Enumeration Type Documentation

◆ dwRoadMarkClassifierSmoothingType

Enumerator
DW_ROADMARK_CLASSIFIER_SMOOTHING_TYPE_NONE 
DW_ROADMARK_CLASSIFIER_SMOOTHING_TYPE_CONFIDENCE_VOTING 

Definition at line 63 of file RoadMarkClassifier.h.

◆ dwRoadMarkClassifierStage

The GPU processing stages of the RoadMarkClassifier.

Enumerator
DW_ROADMARK_CLASSIFIER_STAGE_GPU_ASYNC_PREPROCESSING 

Input images are prepared by cropping and resizing and other transformations set in dataConditionerParams at initialization time in order to have the right properties required by the DNN.

If the given DNN model expects batched input, the given images are divided into batches, where each batch has the expected batch size.

DW_ROADMARK_CLASSIFIER_STAGE_GPU_ASYNC_INFERENCE 

DNN inference is run on the prepared images / batches asynchronously on the GPU.

DW_ROADMARK_CLASSIFIER_STAGE_GPU_ASYNC_INTERPRETATION 

Inference outputs are copied from the device to the host.

DW_ROADMARK_CLASSIFIER_STAGE_CPU_SYNC_POSTPROCESSING 

The inference output is interpreted to get the list of classifiedbjects.

Definition at line 53 of file RoadMarkClassifier_processPipeline.h.

Function Documentation

◆ dwRoadMarkClassifier_bindInputImageArray()

DW_API_PUBLIC dwStatus dwRoadMarkClassifier_bindInputImageArray ( const dwImageCUDA *const *  images,
uint32_t  imageCount,
dwRoadMarkClassifierHandle_t  obj 
)

Binds a list of images that are to be processed and fed to the classifier.

Parameters
[in]imagesArray storing pointers to images.
[in]imageCountNumber of images provided in the array.
[in]objSpecifies the RoadMarkClassifier handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT
Note
Currently, numImages = 1 is only supported.

◆ dwRoadMarkClassifier_bindInputRoadmarkDetection()

DW_API_PUBLIC dwStatus dwRoadMarkClassifier_bindInputRoadmarkDetection ( const dwRoadmarkDetection roadmarks,
dwRoadMarkClassifierHandle_t  obj 
)

Binds the output roadmarks to the classifier.

Parameters
[in]roadmarksPointer to detected landmarks for the given frames.
[in]objSpecifies the RoadMarkClassifier handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwRoadMarkClassifier_bindOutput()

DW_API_PUBLIC dwStatus dwRoadMarkClassifier_bindOutput ( dwRoadmarkDetection roadmarks,
dwRoadMarkClassifierHandle_t  obj 
)

Binds the output of road mark classifier.

Parameters
[in,out]roadmarksPointer to road mark classifier output.
[in]objSpecifies the RoadMarkClassifier handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwRoadMarkClassifier_getCUDAStream()

DW_API_PUBLIC dwStatus dwRoadMarkClassifier_getCUDAStream ( cudaStream_t *  stream,
dwRoadMarkClassifierHandle_t  obj 
)

Gets the CUDA stream used.

Parameters
[out]streamThe CUDA stream used.
[in]objA pointer to the RoadMarkClassifier handle.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS

◆ dwRoadMarkClassifier_getThreshold()

DW_API_PUBLIC dwStatus dwRoadMarkClassifier_getThreshold ( float32_t threshold,
dwRoadMarkClassifierHandle_t  obj 
)

Gets the classification threshold used.

Parameters
[out]thresholdThe classification threshold used.
[in]objA pointer to the RoadMarkClassifier handle.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS

◆ dwRoadMarkClassifier_initDefaultParams()

DW_API_PUBLIC dwStatus dwRoadMarkClassifier_initDefaultParams ( dwRoadMarkClassifierParams classifierParams)

Initializes default params values for dwRoadMarkClassifier.

Parameters
[out]classifierParamsRoadMarkClassifier parameters.
Returns
DW_SUCCESS, DW_INVALID_ARGUMENT

◆ dwRoadMarkClassifier_initializeFromRoadMarkNet()

DW_API_PUBLIC dwStatus dwRoadMarkClassifier_initializeFromRoadMarkNet ( dwRoadMarkClassifierHandle_t obj,
dwRoadMarkNetHandle_t  roadMarkNet,
const dwRoadMarkClassifierParams classifierParams,
dwContextHandle_t  ctx 
)

Initializes RoadMarkClassifier module with a RoadMarkNet DNN inference module.

Parameters
[out]objA pointer to RoadMarkClassifier handle that is initialized from parameters.
[in]roadMarkNetSpecifies the handle to the dnn module which is initialized with classifier network.
[in]classifierParamsProvides parameters for initializing the classifier.
[in]ctxSpecifies the handle to the context.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwRoadMarkClassifier_process()

DW_API_PUBLIC dwStatus dwRoadMarkClassifier_process ( dwRoadMarkClassifierStage  stage,
dwRoadMarkClassifierHandle_t  obj 
)

Perform road mark classifier GPU stages.

Inputs and outputs must be bound before this call.

Parameters
[in]stageProcessing stage to run.
[in]objSpecifies the RoadMarkClassifier handle.
Returns
DW_INVALID_ARGUMENT, DW_FAILURE, DW_SUCCESS

◆ dwRoadMarkClassifier_release()

DW_API_PUBLIC dwStatus dwRoadMarkClassifier_release ( dwRoadMarkClassifierHandle_t  obj)

Releases the RoadMarkClassifier module.

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

◆ dwRoadMarkClassifier_reset()

DW_API_PUBLIC dwStatus dwRoadMarkClassifier_reset ( dwRoadMarkClassifierHandle_t  obj)

Resets RoadMarkClassifier.

Parameters
[in]objHandle to reset.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwRoadMarkClassifier_setCUDAStream()

DW_API_PUBLIC dwStatus dwRoadMarkClassifier_setCUDAStream ( cudaStream_t  stream,
dwRoadMarkClassifierHandle_t  obj 
)

Sets the CUDA stream to be used.

Parameters
[in]streamThe CUDA stream to be used.
[in]objA pointer to the RoadMarkClassifier handle that is updated.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS

◆ dwRoadMarkClassifier_setThreshold()

DW_API_PUBLIC dwStatus dwRoadMarkClassifier_setThreshold ( float32_t  threshold,
dwRoadMarkClassifierHandle_t  obj 
)

Sets the classification threshold to be used.

Parameters
[in]thresholdThe classification threshold to use.
[in]objA pointer to the RoadMarkClassifier handle that is updated.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS