Defines ParkNetDetector module.
Defines parking space detector module based on ParkNet.
|
DW_API_PUBLIC dwStatus | dwParkNetDetector_bindInput (const dwImageCUDA *frame, dwParkNetDetectorHandle_t obj) |
| Binds the input image to the detector. More...
|
|
DW_API_PUBLIC dwStatus | dwParkNetDetector_bindOutput (dwParkDetection *parkingSpaces, dwParkNetDetectorHandle_t obj) |
| Bind object array that holds parking space boundaries. More...
|
|
DW_API_PUBLIC dwStatus | dwParkNetDetector_getCUDAStream (cudaStream_t *stream, dwParkNetDetectorHandle_t obj) |
| Gets the CUDA stream used. More...
|
|
DW_API_PUBLIC dwStatus | dwParkNetDetector_getParkDetections (dwParkDetection *parkingSpaces, dwParkNetDetectorHandle_t obj) |
| Return the interpreted output. More...
|
|
DW_API_PUBLIC dwStatus | dwParkNetDetector_inferDeviceAsync (dwParkNetDetectorHandle_t obj) |
| Runs inference using the provided DNN model. More...
|
|
DW_API_PUBLIC dwStatus | dwParkNetDetector_initDefaultParams (dwParkNetDetectorParams *detectorParams) |
| Initializes ParkNetDetector parameters structure with default values. More...
|
|
DW_API_PUBLIC dwStatus | dwParkNetDetector_initializeFromParkNet (dwParkNetDetectorHandle_t *obj, const dwParkNetDetectorParams *detectorParams, dwParkNetHandle_t parknet, dwContextHandle_t ctx) |
| Initializes ParkNetDetector module with a ParkNet module. More...
|
|
DW_API_PUBLIC dwStatus | dwParkNetDetector_interpret (dwParkNetDetectorHandle_t obj) |
| Output of the inference (dwObjectDetector_inferDeviceAsync) is interpreted to get the list of object proposals. More...
|
|
DW_API_PUBLIC dwStatus | dwParkNetDetector_process (dwParkNetDetectorStage stage, dwParkNetDetectorHandle_t obj) |
| Process the bound input frame array and store the result to where pointed by bound output array. More...
|
|
DW_API_PUBLIC dwStatus | dwParkNetDetector_release (dwParkNetDetectorHandle_t obj) |
| Releases the ParkNetDetector module. More...
|
|
DW_API_PUBLIC dwStatus | dwParkNetDetector_reset (dwParkNetDetectorHandle_t obj) |
| Resets ParkNetDetector. More...
|
|
DW_API_PUBLIC dwStatus | dwParkNetDetector_setCameraExtrinsics (dwTransformation3f cam2rig, dwParkNetDetectorHandle_t obj) |
| Set the transformation from camera to rig. More...
|
|
DW_API_PUBLIC dwStatus | dwParkNetDetector_setCUDAStream (const cudaStream_t stream, dwParkNetDetectorHandle_t obj) |
| Sets the CUDA stream used. More...
|
|
◆ dwParkDetection
◆ dwParkNetDetectorParams
struct dwParkNetDetectorParams |
Data Fields |
dwCameraModelHandle_t |
cam |
Calibrated camera handle. |
dwTransformation3f |
cam2Rig |
Camera to rig transformation matrix. |
uint32_t |
imageHeight |
|
uint32_t |
imageWidth |
|
uint32_t |
maxNumImages |
Maximum number of images (cannot be larger than DW_DETECTOR_MAX_IMAGES). Default is 1. |
dwRect |
ROI |
to have the right size for DNN. Default ROI is the whole image. |
float32_t |
scaleOriginalToInput |
Image size ratio. |
◆ dwParkObject
◆ DW_PARK_DETECTION_MAX_COUNT
#define DW_PARK_DETECTION_MAX_COUNT 5000 |
◆ DW_PARK_DETECTION_N_COORDINATES_2D
#define DW_PARK_DETECTION_N_COORDINATES_2D 8 |
◆ DW_PARK_DETECTION_N_COORDINATES_3D
#define DW_PARK_DETECTION_N_COORDINATES_3D 12 |
◆ dwParkNetDetectorHandle_t
◆ dwParkNetDetectorStage
Defines the processing stages of a parking space detector.
Enumerator |
---|
DW_PARKNET_DETECTOR_STAGE_GPU_ASYNC_INFERENCE | |
DW_PARKNET_DETECTOR_STAGE_CPU_POSTPROCESSING | |
DW_PARKNET_DETECTOR_STAGE_COUNT | |
Definition at line 55 of file ParkNetDetector_processPipeline.h.
◆ dwParkNetDetector_bindInput()
Binds the input image to the detector.
- Parameters
-
[in] | frame | Pointer to a cuda-frame where the detector is to be applied. |
[in] | obj | Specifies the ParkNetDetector handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT
◆ dwParkNetDetector_bindOutput()
Bind object array that holds parking space boundaries.
- Parameters
-
[in] | parkingSpaces | pointer to the parking space results object. |
[in] | obj | Specifies the ParkNetDetector handle. |
- Returns
- DW_SUCCESS operation completed successful DW_INVALID_ARGUMENT null handle passed as argument
◆ dwParkNetDetector_getCUDAStream()
Gets the CUDA stream used.
- Parameters
-
[out] | stream | The CUDA stream used. |
[in] | obj | A pointer to the ParkNetDetector handle. |
- Returns
- DW_INVALID_ARGUMENT, DW_SUCCESS
◆ dwParkNetDetector_getParkDetections()
Return the interpreted output.
- Parameters
-
[in] | parkingSpaces | Pointer to a structure to populate with information about available parking spaces. |
[in] | obj | Specifies the ParkNet-detector handle. |
- Returns
- DW_SUCCESS operation completed successful DW_INVALID_ARGUMENT null handle passed as argument
◆ dwParkNetDetector_inferDeviceAsync()
Runs inference using the provided DNN model.
The inference pipeline is as follows:
- DataPreparation: Input images are prepared by scaling, padding 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.
- Inference: Inference is run on the prepared image.
- Parameters
-
[in] | obj | Specifies the ParkNetDetector handle which already has an input image bound to it. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT
◆ dwParkNetDetector_initDefaultParams()
Initializes ParkNetDetector parameters structure with default values.
- Parameters
-
[out] | detectorParams | ParkNetDetector parameters. |
- Returns
- DW_SUCCESS, DW_INVALID_ARGUMENT
◆ dwParkNetDetector_initializeFromParkNet()
Initializes ParkNetDetector module with a ParkNet module.
- Parameters
-
[out] | obj | A pointer to ParkNetDetector handle that is initialized from parameters. |
[in] | detectorParams | A pointer to ParkNetDetector parameters. |
[in] | parknet | Specifies the handle to the ParkNet module. |
[in] | ctx | Specifies the handle to the context. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT
◆ dwParkNetDetector_interpret()
Output of the inference (dwObjectDetector_inferDeviceAsync) is interpreted to get the list of object proposals.
If fusing is activated, proposals coming from different images is filled into a single list.
- Parameters
-
[in] | obj | Specifies the ObjectDetector handle. |
- Returns
- DW_SUCCESS operation completed successful DW_INVALID_ARGUMENT null handle passed as argument
◆ dwParkNetDetector_process()
Process the bound input frame array and store the result to where pointed by bound output array.
- Parameters
-
[in] | stage | the processing stage to be executed. |
[in] | obj | A Parknet detector handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
◆ dwParkNetDetector_release()
Releases the ParkNetDetector module.
- Parameters
-
[in] | obj | The object handle to release. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
- Note
- This method renders the handle unusable.
◆ dwParkNetDetector_reset()
Resets ParkNetDetector.
- Parameters
-
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
◆ dwParkNetDetector_setCameraExtrinsics()
Set the transformation from camera to rig.
- Parameters
-
[in] | cam2rig | Specifies the transformation from camera to rig. |
[in] | obj | A parknet detector handle. |
- Returns
- DW_INVALID_HANDLE, DW_BAD_CAST, DW_SUCCESS
◆ dwParkNetDetector_setCUDAStream()
Sets the CUDA stream used.
- Parameters
-
[in] | stream | The CUDA stream used. |
[in] | obj | A pointer to the ParkNetDetector handle that is updated. |
- Returns
- DW_INVALID_ARGUMENT, DW_SUCCESS