Defines free space detector module based on FreeSpaceNet, i.e., DNN based free space detector.
|
| 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_getDNNMetaData (dwDNNMetaData *metaData, dwFreeSpaceDetectorHandle_t obj) |
| | Returns the DNN metadata. More...
|
| |
| DW_API_PUBLIC dwStatus | dwFreeSpaceDetector_initializeCalibratedFreeSpaceNet (dwFreeSpaceDetectorHandle_t *obj, uint32_t frameWidth, uint32_t frameHeight, cudaStream_t stream, dwTransformation cam2rig, float32_t maxDistance, dwCalibratedCameraHandle_t cam, dwContextHandle_t ctx) |
| | Initializes a free space detector module based on FreeSpaceNet with a calibrated camera. More...
|
| |
| DW_API_PUBLIC dwStatus | dwFreeSpaceDetector_initializeFreeSpaceNet (dwFreeSpaceDetectorHandle_t *obj, uint32_t frameWidth, uint32_t frameHeight, cudaStream_t stream, dwContextHandle_t ctx) |
| | Initializes a free space detector module based on FreeSpaceNet. 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_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_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) |
| | Sets the detection Region of Interest (ROI) for the detector. 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) |
| | Sets the temporal smoothing factor. More...
|
| |
◆ dwFreeSpaceDetection
| struct dwFreeSpaceDetection |
| Data Fields |
|
const dwVector2f * |
boundaryImagePoint |
Boundary point location in image space (pixels). |
|
const dwFreeSpaceBoundaryType * |
boundaryType |
Category of the boundary. |
|
const dwVector2f * |
boundaryWorldPoint |
Boundary point location in car domain (meter). |
|
uint32_t |
numberOfBoundaryPoints |
|
◆ dwFreeSpaceDetectorHandle_t
◆ dwFreeSpaceBoundaryType
Category of free space boundary.
| Enumerator |
|---|
| DW_BOUNDARY_TYPE_OTHER | boundary with other objects
|
| DW_BOUNDARY_TYPE_CURB | boundary with curb
|
| DW_BOUNDARY_TYPE_VEHICLE | boundary with vehicle
|
| DW_BOUNDARY_TYPE_PERSON | boundary with person
|
| DW_BOUNDARY_TYPE_UNDEFINED | undefined boundary
|
Definition at line 64 of file FreeSpaceDetector.h.
◆ dwFreeSpaceDetector_getBoundaryDetection()
Gets the latest computed results.
This method has to be executed after dwFreeSpaceDetector_interpretHost() to get the current output of the detector.
- Note
- The dwFreeSpaceDetection component pointers are only valid till the next proccesDeviceAsync method
- Parameters
-
| [out] | boundary | A user pointer to be filled with information about detected boundary points. |
| [in] | obj | A free space detector handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
◆ dwFreeSpaceDetector_getCUDAStream()
Gets CUDA stream used by the free space detection.
- Parameters
-
| [out] | stream | The CUDA stream currently used. |
| [in] | obj | A handle to the free space detection module. |
- Returns
- DW_INVALID_HANDLE if the given context handle is invalid,
or DW_SUCCESS otherwise.
◆ dwFreeSpaceDetector_getDetectionROI()
Gets the detection Region of Interest (ROI) for the detector.
- Parameters
-
| [out] | roi | ROI of frame to be processed by the detector, default to full frame |
| [in] | obj | A free space detector handle |
- Returns
- dwRect&
◆ dwFreeSpaceDetector_getDNNMetaData()
Returns the DNN metadata.
- Parameters
-
| [out] | metaData | Pointer to metaData struct. |
| [in] | obj | Specifies the FreeSpace handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT
◆ dwFreeSpaceDetector_initializeCalibratedFreeSpaceNet()
Initializes a free space detector module based on FreeSpaceNet with a calibrated camera.
Calibrated camera is used to estimate boundary points in car space.
- Parameters
-
| [out] | obj | A pointer to the free space detector handle for the created module. |
| [in] | frameWidth | Width of camera frames to apply free space detector later. |
| [in] | frameHeight | Height of camera frames to apply free space detector later. |
| [in] | stream | CUDA stream on which to perform all operations. |
| [in] | cam2rig | Specifies the transformation from camera to rig. |
| [in] | maxDistance | Maximum distance in meters at which free space boundary should be detected. |
| [in] | cam | Specifies the handle to the calibrated front looking camera. |
| [in] | ctx | Specifies the handler to the context to create FreeSpaceNet. |
- Returns
- DW_INVALID_ARGUMENT, DW_SUCCESS
- Note
- Extrinsic parameters of the camera must take rig as the origin of World Coordinate System.
◆ dwFreeSpaceDetector_initializeFreeSpaceNet()
Initializes a free space detector module based on FreeSpaceNet.
By default it runs on stream 0
- Parameters
-
| [out] | obj | A pointer to the free space detector handle for the created module. |
| [in] | frameWidth | Width of camera frames to apply free space detector later. |
| [in] | frameHeight | Height of camera frames to apply free space detector later. |
| [in] | stream | CUDA stream on which to perform all operations. |
| [in] | ctx | Specifies the handler to the context to create FreeSpaceNet. |
- Returns
- DW_INVALID_ARGUMENT, DW_SUCCESS
◆ dwFreeSpaceDetector_interpretHost()
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] | obj | A free space detector handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
◆ dwFreeSpaceDetector_processDeviceAsync()
Processes the given frame on the GPU asynchronously.
- Parameters
-
| [in] | frame | CUDA frame to be processed for detection. |
| [in] | obj | A free space detector handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
◆ dwFreeSpaceDetector_release()
Releases the detector module.
- Parameters
-
| [in] | obj | A pointer to the object handle to release. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
- Note
- This method renders the handle unusable.
◆ dwFreeSpaceDetector_reset()
Resets the free space detector module.
- Parameters
-
| [in] | obj | Specifies the detector to reset. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
◆ dwFreeSpaceDetector_setCUDAStream()
Sets the CUDA stream for CUDA related operations.
- Note
- The ownership of the stream remains by the callee.
- Parameters
-
| [in] | stream | The CUDA stream to be used. Default is the one passed during initialization. |
| [in] | obj | A 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.
◆ dwFreeSpaceDetector_setDetectionROI()
Sets the detection Region of Interest (ROI) for the detector.
- Parameters
-
| [in] | roi | ROI of frame to be processed by the detector, default to full frame. |
| [in] | obj | A free space detector handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
◆ dwFreeSpaceDetector_setSpatialSmoothFilterWidth()
Sets the spatial smoothing filter width.
- Note
- Filter width must be an odd integer within (1, numberOfBoundaryPoints/10). The boundary of the 1-D Gaussian filter is set to 2.5* standard deviation.
- Parameters
-
| [in] | width | Width of an 1-D Gaussian filter used to spatially smooth the boundary points. Default to 1 and no spatial smoothing. |
| [in] | obj | A free space detector handle (must be of type FreeSpaceNet). |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
◆ dwFreeSpaceDetector_setTemporalSmoothFactor()
Sets the temporal smoothing factor.
- Parameters
-
| [in] | factor | Average 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] | obj | A free space detector handle (must be of type FreeSpaceNet). |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST