DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

FreespaceDetector Interface

Detailed Description

Defines free space detector module based on OpenRoadNet, i.e., DNN based free space detector.

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

Data Structures

struct  dwFreespaceDetection
 Holds the definition of free space boundary in one image. More...
 
struct  dwFreespaceDetectorInitParams
 Holds the common free space detector initialization parameters. More...
 
struct  dwFreespaceDetectorRuntimeParams
 Holds the free space detector runtime parameters. More...
 

Macros

#define DW_FREESPACE_IMAGE_MAX_COUNT   6
 Maximum number of images to run free space detector on. More...
 
#define DW_FREESPACE_POINT_MAX_COUNT   960
 

Typedefs

typedef struct dwFreespaceDetectorObject * dwFreespaceDetectorHandle_t
 Handle to a free space detector. More...
 

Enumerations

enum  dwFreespaceDetectorStage {
  DW_FREESPACE_DETECTOR_STAGE_GPU_ASYNC_PREPROCESSING = 0,
  DW_FREESPACE_DETECTOR_STAGE_GPU_ASYNC_INFERENCE = 1,
  DW_FREESPACE_DETECTOR_STAGE_CPU_POSTPROCESSING = 2,
  DW_FREESPACE_DETECTOR_STAGE_COUNT = 3
}
 Defines the processing stages of a free space detector. More...
 

Functions

DW_API_PUBLIC dwStatus dwFreespaceDetector_bindInput (const dwImageCUDA *const *frames, uint32_t frameCount, dwFreespaceDetectorHandle_t obj)
 Binds the input to the detector as a list of images. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_bindInputTensor (dwAutoNetOutputHandle_t networkOutput, dwFreespaceDetectorHandle_t obj)
 Binds the network inference output tensor. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_bindOutput (dwFreespaceDetection *boundary, uint32_t frameIdx, dwFreespaceDetectorHandle_t obj)
 Bind the ouput of the free space detector. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_detectBoundary (dwFreespaceDetection *boundary, const dwImageCUDA *frame, dwFreespaceDetectorHandle_t obj)
 Processes the given frame on the GPU asynchronously, runs the interpretation of the processed results on the CPU, and gets the latest computed results. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_detectBoundaryAutoNet (dwFreespaceDetection *boundary, dwAutoNetOutputHandle_t input, dwFreespaceDetectorHandle_t obj)
 Detects boundaries from the given DNN inference output. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_getBoundaryDetection (dwFreespaceDetection *boundary, dwFreespaceDetectorHandle_t obj)
 Gets the latest computed results. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_getCUDAStream (cudaStream_t *stream, dwFreespaceDetectorHandle_t obj)
 Gets CUDA stream used by the free space detection. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_getDetectionROI (dwRect *roi, dwFreespaceDetectorHandle_t obj)
 Gets the detection Region of Interest (ROI) for the detector. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_getDetectionROI_new (uint32_t imageIdx, dwRect *roi, dwFreespaceDetectorHandle_t obj)
 Gets the detection Region of Interest (ROI) for the detector. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_getDNNMetaData (dwDNNMetaData *metaData, dwFreespaceDetectorHandle_t obj)
 Returns the DNN metadata. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_getRuntimeParams (dwFreespaceDetectorRuntimeParams *rtParams, dwFreespaceDetectorHandle_t obj)
 Get the runtime parameters associated with a free space detector module. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_initializeFromAutoNet (dwFreespaceDetectorHandle_t *obj, dwAutoNetHandle_t autonet, const dwFreespaceDetectorInitParams *initParams, dwContextHandle_t ctx)
 Initializes a free space detector module based on OpenRoadNet. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_initializeFromOpenRoadNet (dwFreespaceDetectorHandle_t *obj, dwOpenRoadNetHandle_t openroadnet, uint32_t frameWidth, uint32_t frameHeight, cudaStream_t stream, dwContextHandle_t ctx)
 Initializes a free space detector module based on OpenRoadNet. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_initializeFromOpenRoadNet_new (dwFreespaceDetectorHandle_t *obj, const dwFreespaceDetectorInitParams *initParams, dwContextHandle_t ctx)
 Initializes a free space detector module based on OpenRoadNet. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_interpretHost (dwFreespaceDetectorHandle_t obj)
 Runs the interpretation of the processed results on the CPU. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_process (dwFreespaceDetectorStage stage, dwFreespaceDetectorHandle_t obj)
 Process the bound input frame array and store the result to where pointed by bound output array. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_processDeviceAsync (const dwImageCUDA *frame, dwFreespaceDetectorHandle_t obj)
 Processes the given frame on the GPU asynchronously. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_release (dwFreespaceDetectorHandle_t obj)
 Releases the detector module. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_reset (dwFreespaceDetectorHandle_t obj)
 Resets the free space detector module. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_setCameraExtrinsics (dwTransformation3f cam2rig, dwFreespaceDetectorHandle_t obj)
 Set the transformation from camera to rig. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_setCameraExtrinsics_new (uint32_t imageIdx, dwTransformation3f cam2rig, dwFreespaceDetectorHandle_t obj)
 Set the camera to rig transformation for a specific camera image in the batch. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_setCameraHandle (dwCameraModelHandle_t cam, dwFreespaceDetectorHandle_t obj)
 Set the handle to the calibrated camera. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_setCUDAStream (cudaStream_t stream, dwFreespaceDetectorHandle_t obj)
 Sets the CUDA stream for CUDA related operations. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_setDetectionROI (const dwRect *roi, dwFreespaceDetectorHandle_t obj)
 Set the detection Region of Interest (ROI) for the detector. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_setDetectionROI_new (uint32_t imageIdx, const dwRect *roi, dwFreespaceDetectorHandle_t obj)
 Set the detection Region of Interest (ROI) for the detector. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_setMaxFreespaceDistance (float32_t maxDistance, dwFreespaceDetectorHandle_t obj)
 Set the maximum distance in meters at which free space boundary can be detected. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_setMaxFreespaceDistance_new (uint32_t imageIdx, float32_t maxDistance, dwFreespaceDetectorHandle_t obj)
 Set the maximum distance in meters free space boundary can be detected for a specific camera image in the batch. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_setRuntimeParams (const dwFreespaceDetectorRuntimeParams *rtParams, dwFreespaceDetectorHandle_t obj)
 Set the runtime parameters associated with a free space detector module. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_setSpatialSmoothFilterWidth (uint32_t width, dwFreespaceDetectorHandle_t obj)
 Sets the spatial smoothing filter width. More...
 
DW_API_PUBLIC dwStatus dwFreespaceDetector_setTemporalSmoothFactor (float32_t factor, dwFreespaceDetectorHandle_t obj)
 Set the temporal smoothing factor. More...
 

Data Structure Documentation

◆ dwFreespaceDetection

struct dwFreespaceDetection
Data Fields
dwVector2f boundaryImagePoint[DW_FREESPACE_POINT_MAX_COUNT] Boundary point location in image space (pixels).
dwFreespaceBoundaryType boundaryType[DW_FREESPACE_POINT_MAX_COUNT] Category of the boundary.
dwVector2f boundaryWorldPoint[DW_FREESPACE_POINT_MAX_COUNT] Boundary point location in car domain (meter).
uint32_t numberOfBoundaryPoints
uint32_t sensorId Camera sensor ID.
dwTime_t timestamp Timestamp of this detection in microseconds since the epoch.

◆ dwFreespaceDetectorInitParams

struct dwFreespaceDetectorInitParams
Data Fields
dwCameraModelHandle_t cam Specifies the handle to the calibrated camera. Set to DW_NULL_HANDLE to get image space output only.
dwCameraModelHandle_t cam_new[DW_FREESPACE_IMAGE_MAX_COUNT] Camera intrinsics of batched frames. Set to DW_NULL_HANDLE to get image space output only.
uint32_t frameHeight Height of camera frame when initialized without camera intrinsics, ignored if camera handle is valid.
uint32_t frameWidth Width of camera frame when initialized without camera intrinsics, ignored if camera handle is valid.
float32_t maxDistance[DW_FREESPACE_IMAGE_MAX_COUNT] Maximum valid distances in meters of the batched frames.

Projected freespace boundary distance beyond maxDistance will be truncated. Note that maxDistances are effective only if proper camera intrinsics and extrisics were setup.

uint32_t maxNumImages Maximum number of images (cannot be larger than DW_FREESPACE_IMAGE_MAX_COUNT). Default is 1.
dwOpenRoadNetHandle_t openroadnet Specifies the handle to the OpenRoadNet module.
dwRect roi[DW_FREESPACE_IMAGE_MAX_COUNT] Region Of Interest of batched frames to be processed by the detector.
uint32_t sensorId[DW_FREESPACE_IMAGE_MAX_COUNT] Camera sensor IDs.
cudaStream_t stream CUDA stream on which to perform all operations.

◆ dwFreespaceDetectorRuntimeParams

struct dwFreespaceDetectorRuntimeParams
Data Fields
float32_t maxDistance Maximum distance in meters at which free space boundary distance can be distinguished.
dwRect roi Region Of Interest of frame to be processed by the detector.
uint32_t spatialSmoothingWidth Width of an 1-D Gaussian filter, check dwFreespaceDetector_setSpatialSmoothFilterWidth for more details.
float32_t temporalSmoothingFactor Temporal smooth factor, check dwFreespaceDetector_setTemporalSmoothFactor for more details.

Macro Definition Documentation

◆ DW_FREESPACE_IMAGE_MAX_COUNT

#define DW_FREESPACE_IMAGE_MAX_COUNT   6

Maximum number of images to run free space detector on.

Definition at line 65 of file FreespaceDetector.h.

◆ DW_FREESPACE_POINT_MAX_COUNT

#define DW_FREESPACE_POINT_MAX_COUNT   960

Definition at line 66 of file FreespaceDetector.h.

Typedef Documentation

◆ dwFreespaceDetectorHandle_t

typedef struct dwFreespaceDetectorObject* dwFreespaceDetectorHandle_t

Handle to a free space detector.

Definition at line 150 of file FreespaceDetector.h.

Enumeration Type Documentation

◆ dwFreespaceDetectorStage

Defines the processing stages of a free space detector.

Enumerator
DW_FREESPACE_DETECTOR_STAGE_GPU_ASYNC_PREPROCESSING 
DW_FREESPACE_DETECTOR_STAGE_GPU_ASYNC_INFERENCE 
DW_FREESPACE_DETECTOR_STAGE_CPU_POSTPROCESSING 
DW_FREESPACE_DETECTOR_STAGE_COUNT 

Definition at line 58 of file FreespaceDetector_processPipeline.h.

Function Documentation

◆ dwFreespaceDetector_bindInput()

DW_API_PUBLIC dwStatus dwFreespaceDetector_bindInput ( const dwImageCUDA *const *  frames,
uint32_t  frameCount,
dwFreespaceDetectorHandle_t  obj 
)

Binds the input to the detector as a list of images.

Parameters
[in]framesArray storing pointers to frames where the detector is to be applied.
[in]frameCountNumber of frames provided in the array.
[in]objSpecifies the FreespaceDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwFreespaceDetector_bindInputTensor()

DW_API_PUBLIC dwStatus dwFreespaceDetector_bindInputTensor ( dwAutoNetOutputHandle_t  networkOutput,
dwFreespaceDetectorHandle_t  obj 
)

Binds the network inference output tensor.

Parameters
[in]networkOutputnetwork detection tensor
[in]objSpecifies the ObjectDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwFreespaceDetector_bindOutput()

DW_API_PUBLIC dwStatus dwFreespaceDetector_bindOutput ( dwFreespaceDetection boundary,
uint32_t  frameIdx,
dwFreespaceDetectorHandle_t  obj 
)

Bind the ouput of the free space detector.

Parameters
[in]boundaryPointer to free space boundary output array structure.
[in]frameIdxThe frame index corresponds to the boundary to be bound.
[in]objSpecifies the FreespaceDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwFreespaceDetector_detectBoundary()

DW_API_PUBLIC dwStatus dwFreespaceDetector_detectBoundary ( dwFreespaceDetection boundary,
const dwImageCUDA frame,
dwFreespaceDetectorHandle_t  obj 
)

Processes the given frame on the GPU asynchronously, runs the interpretation of the processed results on the CPU, and gets the latest computed results.

Parameters
[out]boundaryA user pointer to be filled with information about detected boundary points.
[in]frameCUDA frame to be processed for detection.
[in]objA free space detector handle.
Returns
DW_INVALID_HANDLE, DW_BAD_CAST, DW_SUCCESS

◆ dwFreespaceDetector_detectBoundaryAutoNet()

DW_API_PUBLIC dwStatus dwFreespaceDetector_detectBoundaryAutoNet ( dwFreespaceDetection boundary,
dwAutoNetOutputHandle_t  input,
dwFreespaceDetectorHandle_t  obj 
)

Detects boundaries from the given DNN inference output.

The array for the output detections has to be allocated beforehand.

Parameters
[out]boundaryA user pointer to be filled with information about detected boundary points.
[in]inputDNN inference output.
[in]objA free space detector handle.
Returns
DW_INVALID_HANDLE, DW_BAD_CAST, DW_SUCCESS

◆ dwFreespaceDetector_getBoundaryDetection()

DW_API_PUBLIC dwStatus dwFreespaceDetector_getBoundaryDetection ( dwFreespaceDetection boundary,
dwFreespaceDetectorHandle_t  obj 
)

Gets the latest computed results.

This method has to be executed after dwFreespaceDetector_interpretHost() to get the current output of the detector.

Parameters
[out]boundaryA user pointer to be filled with information about detected boundary points.
[in]objA free space detector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
Note
The dwFreespaceDetection component pointers are only valid till the next proccesDeviceAsync method

◆ dwFreespaceDetector_getCUDAStream()

DW_API_PUBLIC dwStatus dwFreespaceDetector_getCUDAStream ( cudaStream_t *  stream,
dwFreespaceDetectorHandle_t  obj 
)

Gets CUDA stream used by the free space detection.

Parameters
[out]streamThe CUDA stream currently used.
[in]objA handle to the free space detection module.
Returns
DW_INVALID_HANDLE if the given context handle is invalid,
or DW_SUCCESS otherwise.

◆ dwFreespaceDetector_getDetectionROI()

DW_API_PUBLIC dwStatus dwFreespaceDetector_getDetectionROI ( dwRect roi,
dwFreespaceDetectorHandle_t  obj 
)

Gets the detection Region of Interest (ROI) for the detector.

Parameters
[out]roiROI of frame to be processed by the detector, default to full frame
[in]objA free space detector handle
Returns
dwRect&

◆ dwFreespaceDetector_getDetectionROI_new()

DW_API_PUBLIC dwStatus dwFreespaceDetector_getDetectionROI_new ( uint32_t  imageIdx,
dwRect roi,
dwFreespaceDetectorHandle_t  obj 
)

Gets the detection Region of Interest (ROI) for the detector.

Parameters
[in]imageIdxThe index of camera image in the batch.
[out]roiROI of frame to be processed by the detector, default to full frame
[in]objA free space detector handle
Returns
dwRect&

◆ dwFreespaceDetector_getDNNMetaData()

DW_API_PUBLIC dwStatus dwFreespaceDetector_getDNNMetaData ( dwDNNMetaData metaData,
dwFreespaceDetectorHandle_t  obj 
)

Returns the DNN metadata.

Parameters
[out]metaDataPointer to metaData struct.
[in]objSpecifies the Freespace handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwFreespaceDetector_getRuntimeParams()

DW_API_PUBLIC dwStatus dwFreespaceDetector_getRuntimeParams ( dwFreespaceDetectorRuntimeParams rtParams,
dwFreespaceDetectorHandle_t  obj 
)

Get the runtime parameters associated with a free space detector module.

Parameters
[in]rtParamsRuntime parameters to be retrieved from a free space detector module.
[in]objA free space detector handle.
Returns
DW_INVALID_HANDLE, DW_BAD_CAST, DW_SUCCESS

◆ dwFreespaceDetector_initializeFromAutoNet()

DW_API_PUBLIC dwStatus dwFreespaceDetector_initializeFromAutoNet ( dwFreespaceDetectorHandle_t obj,
dwAutoNetHandle_t  autonet,
const dwFreespaceDetectorInitParams initParams,
dwContextHandle_t  ctx 
)

Initializes a free space detector module based on OpenRoadNet.

Parameters
[out]objA pointer to the landmark detector handle for the created module.
[in]autonetSpecifies the handle to the autonet module.
[in]initParamsParameters required to initialize a free space detector module.
[in]ctxSpecifies the handler to the context to create OpenRoadNet.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS

◆ dwFreespaceDetector_initializeFromOpenRoadNet()

DW_API_PUBLIC dwStatus dwFreespaceDetector_initializeFromOpenRoadNet ( dwFreespaceDetectorHandle_t obj,
dwOpenRoadNetHandle_t  openroadnet,
uint32_t  frameWidth,
uint32_t  frameHeight,
cudaStream_t  stream,
dwContextHandle_t  ctx 
)

Initializes a free space detector module based on OpenRoadNet.

Parameters
[out]objA pointer to the free space detector handle for the created module.
[in]openroadnetSpecifies the handle to the OpenRoadNet module.
[in]frameWidthWidth of camera frames to apply free space detector later.
[in]frameHeightHeight of camera frames to apply free space detector later.
[in]streamCUDA stream on which to perform all operations.
[in]ctxSpecifies the handler to the context to create OpenRoadNet.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS

◆ dwFreespaceDetector_initializeFromOpenRoadNet_new()

DW_API_PUBLIC dwStatus dwFreespaceDetector_initializeFromOpenRoadNet_new ( dwFreespaceDetectorHandle_t obj,
const dwFreespaceDetectorInitParams initParams,
dwContextHandle_t  ctx 
)

Initializes a free space detector module based on OpenRoadNet.

Parameters
[out]objA pointer to the free space detector handle for the created module.
[in]initParamsParameters required to initialize a free space detector module.
[in]ctxSpecifies the handler to the context to create OpenRoadNet.
Returns
DW_INVALID_ARGUMENT, DW_BAD_CAST, DW_SUCCESS

◆ dwFreespaceDetector_interpretHost()

DW_API_PUBLIC dwStatus dwFreespaceDetector_interpretHost ( dwFreespaceDetectorHandle_t  obj)

Runs the interpretation of the processed results on the CPU.

This method has to be executed after dwFreespaceDetector_processDeviceAsync() to get the actual output of the detector.

Parameters
[in]objA free space detector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwFreespaceDetector_process()

DW_API_PUBLIC dwStatus dwFreespaceDetector_process ( dwFreespaceDetectorStage  stage,
dwFreespaceDetectorHandle_t  obj 
)

Process the bound input frame array and store the result to where pointed by bound output array.

Parameters
[in]stagethe processing stage to be executed.
[in]objA free space detector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwFreespaceDetector_processDeviceAsync()

DW_API_PUBLIC dwStatus dwFreespaceDetector_processDeviceAsync ( const dwImageCUDA frame,
dwFreespaceDetectorHandle_t  obj 
)

Processes the given frame on the GPU asynchronously.

Parameters
[in]frameCUDA frame to be processed for detection.
[in]objA free space detector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwFreespaceDetector_release()

DW_API_PUBLIC dwStatus dwFreespaceDetector_release ( dwFreespaceDetectorHandle_t  obj)

Releases the detector module.

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

◆ dwFreespaceDetector_reset()

DW_API_PUBLIC dwStatus dwFreespaceDetector_reset ( dwFreespaceDetectorHandle_t  obj)

Resets the free space detector module.

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

◆ dwFreespaceDetector_setCameraExtrinsics()

DW_API_PUBLIC dwStatus dwFreespaceDetector_setCameraExtrinsics ( dwTransformation3f  cam2rig,
dwFreespaceDetectorHandle_t  obj 
)

Set the transformation from camera to rig.

Parameters
[in]cam2rigSpecifies the transformation from camera to rig.
[in]objA free space detector handle.
Returns
DW_INVALID_HANDLE, DW_BAD_CAST, DW_SUCCESS

◆ dwFreespaceDetector_setCameraExtrinsics_new()

DW_API_PUBLIC dwStatus dwFreespaceDetector_setCameraExtrinsics_new ( uint32_t  imageIdx,
dwTransformation3f  cam2rig,
dwFreespaceDetectorHandle_t  obj 
)

Set the camera to rig transformation for a specific camera image in the batch.

Parameters
[in]imageIdxThe index of camera image in the batch.
[in]cam2rigSpecifies the transformation from camera to rig.
[in]objA free space detector handle.
Returns
DW_INVALID_HANDLE, DW_BAD_CAST, DW_SUCCESS

◆ dwFreespaceDetector_setCameraHandle()

DW_API_PUBLIC dwStatus dwFreespaceDetector_setCameraHandle ( dwCameraModelHandle_t  cam,
dwFreespaceDetectorHandle_t  obj 
)

Set the handle to the calibrated camera.

Parameters
[in]camSpecifies the handle to the calibrated front looking camera.
[in]objA free space detector handle.
Returns
DW_INVALID_HANDLE, DW_BAD_CAST, DW_SUCCESS

◆ dwFreespaceDetector_setCUDAStream()

DW_API_PUBLIC dwStatus dwFreespaceDetector_setCUDAStream ( cudaStream_t  stream,
dwFreespaceDetectorHandle_t  obj 
)

Sets the CUDA stream for CUDA related operations.

Parameters
[in]streamThe CUDA stream to be used. Default is the one passed during initialization.
[in]objA handle to the free space detector module for which to set CUDA stream.
Returns
DW_INVALID_HANDLE if the given context handle is invalid,
or DW_SUCCESS otherwise.
Note
The ownership of the stream remains by the callee.

◆ dwFreespaceDetector_setDetectionROI()

DW_API_PUBLIC dwStatus dwFreespaceDetector_setDetectionROI ( const dwRect roi,
dwFreespaceDetectorHandle_t  obj 
)

Set the detection Region of Interest (ROI) for the detector.

Parameters
[in]roiROI of frame to be processed by the detector, default to full frame.
[in]objA free space detector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwFreespaceDetector_setDetectionROI_new()

DW_API_PUBLIC dwStatus dwFreespaceDetector_setDetectionROI_new ( uint32_t  imageIdx,
const dwRect roi,
dwFreespaceDetectorHandle_t  obj 
)

Set the detection Region of Interest (ROI) for the detector.

Parameters
[in]imageIdxThe index of camera image in the batch.
[in]roiROI of frame to be processed by the detector, default to full frame.
[in]objA free space detector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwFreespaceDetector_setMaxFreespaceDistance()

DW_API_PUBLIC dwStatus dwFreespaceDetector_setMaxFreespaceDistance ( float32_t  maxDistance,
dwFreespaceDetectorHandle_t  obj 
)

Set the maximum distance in meters at which free space boundary can be detected.

Parameters
[in]maxDistanceMaximum distance in meters at which free space boundary distance can be distinguished.
[in]objA free space detector handle.
Returns
DW_INVALID_HANDLE, DW_SUCCESS

◆ dwFreespaceDetector_setMaxFreespaceDistance_new()

DW_API_PUBLIC dwStatus dwFreespaceDetector_setMaxFreespaceDistance_new ( uint32_t  imageIdx,
float32_t  maxDistance,
dwFreespaceDetectorHandle_t  obj 
)

Set the maximum distance in meters free space boundary can be detected for a specific camera image in the batch.

Parameters
[in]imageIdxThe index of camera image in the batch.
[in]maxDistanceMaximum distance in meters at which free space boundary distance can be distinguished.
[in]objA free space detector handle.
Returns
DW_INVALID_HANDLE, DW_SUCCESS

◆ dwFreespaceDetector_setRuntimeParams()

DW_API_PUBLIC dwStatus dwFreespaceDetector_setRuntimeParams ( const dwFreespaceDetectorRuntimeParams rtParams,
dwFreespaceDetectorHandle_t  obj 
)

Set the runtime parameters associated with a free space detector module.

Parameters
[in]rtParamsRuntime parameters associated with a free space detector module.
[in]objA free space detector handle.
Returns
DW_INVALID_HANDLE, DW_BAD_CAST, DW_SUCCESS

◆ dwFreespaceDetector_setSpatialSmoothFilterWidth()

DW_API_PUBLIC dwStatus dwFreespaceDetector_setSpatialSmoothFilterWidth ( uint32_t  width,
dwFreespaceDetectorHandle_t  obj 
)

Sets the spatial smoothing filter width.

Parameters
[in]widthWidth of an 1-D Gaussian filter used to spatially smooth the boundary points. Default to 1 and no spatial smoothing.
[in]objA free space detector handle (must be of type OpenRoadNet).
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
Note
Filter width must be a positive integer within [4, numberOfBoundaryPoints/10). The boundary of the 1-D Gaussian filter is set to 2.5* standard deviation. Filter width 1 is to turn off spatial smoothing.

◆ dwFreespaceDetector_setTemporalSmoothFactor()

DW_API_PUBLIC dwStatus dwFreespaceDetector_setTemporalSmoothFactor ( float32_t  factor,
dwFreespaceDetectorHandle_t  obj 
)

Set the temporal smoothing factor.

Parameters
[in]factorAverage previous and current free space boundary points.
smoothed point = factor*previous point + (1.0-factor)*current point
To turn off temporal smoothing, set factor to zero (0).
[in]objA free space detector handle (must be of type OpenRoadNet).
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST