DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

ObjectDetector Interface

Detailed Description

Defines ObjectDetector module for object detection.

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

Data Structures

struct  dwObjectDetectorParams
 Object detector configuration parameters. More...
 

Macros

#define DW_OBJECT_DETECTOR_MAX_IMAGES   4
 Maximum number of images the detector can process at a time. More...
 

Typedefs

typedef struct dwObjectDetectorObject * dwObjectDetectorHandle_t
 Handle to an object detector. More...
 

Enumerations

enum  dwObjectDetectorDLAStage {
  DW_OBJECT_DETECTOR_DLA_STAGE_GPU_ASYNC_PREPROCESSING = 0,
  DW_OBJECT_DETECTOR_DLA_STAGE_DLA_ASYNC_INFERENCE,
  DW_OBJECT_DETECTOR_DLA_STAGE_GPU_ASYNC_INTERPRET_DETECTIONS,
  DW_OBJECT_DETECTOR_DLA_STAGE_CPU_SYNC_POSTPROCESSING
}
 The DLA process stages of the ObjectDetector. More...
 
enum  dwObjectDetectorOutputType {
  DW_OBJECT_DETECTOR_OUTPUT_TYPE_PROPOSAL,
  DW_OBJECT_DETECTOR_OUTPUT_TYPE_DETECTION
}
 The type of the detector output. More...
 
enum  dwObjectDetectorStage {
  DW_OBJECT_DETECTOR_STAGE_GPU_ASYNC_PREPROCESSING = 0,
  DW_OBJECT_DETECTOR_STAGE_GPU_ASYNC_INFERENCE,
  DW_OBJECT_DETECTOR_STAGE_GPU_ASYNC_INTERPRET_DETECTIONS,
  DW_OBJECT_DETECTOR_STAGE_CPU_SYNC_POSTPROCESSING
}
 The GPU process stages of the ObjectDetector. More...
 

Functions

DW_API_PUBLIC dwStatus dwObjectDetector_bindInput (const dwImageCUDA *const *images, uint32_t imageCount, dwObjectDetectorHandle_t obj)
 Binds the input to the detector as a list of images. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_bindOutput (dwObjectArray *objectArray, uint32_t imageIdx, dwObjectClass objectClass, dwObjectDetectorOutputType type, dwObjectDetectorHandle_t obj)
 Bind the ouput of the detector to array of objects. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_clearOutputMask (dwObjectClass objectClass, dwObjectDetectorHandle_t obj)
 Clears output mask. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_detectObjects (dwObjectArray *detections, const dwImageCUDA *image, dwObjectDetectorHandle_t obj)
 Detects objects from the given input image. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_getCoverageThreshold (float32_t *covThreshold, dwObjectClass objectClass, dwObjectDetectorHandle_t obj)
 Get coverage threshold for a given class. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_getCUDAStream (cudaStream_t *stream, dwObjectDetectorHandle_t obj)
 Gets the CUDA stream used. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_getOutputMaskDimensions (uint32_t *width, uint32_t *height, dwObjectDetectorHandle_t obj)
 Returns output mask dimensions. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_getROI (dwRect *ROI, dwTransformation2f *outputToObject, uint32_t imageIdx, dwObjectDetectorHandle_t obj)
 Returns the region of interest and the 2D transformation from the image coordinate system to object coordinate system at given index. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_initDefaultParams (dwObjectDetectorParams *detectorParams)
 Initializes ObjectDetector parameters with default values. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_initializeFromDriveNet (dwObjectDetectorHandle_t *obj, const dwObjectDetectorParams *detectorParams, dwDriveNetHandle_t drivenet, dwContextHandle_t ctx)
 Initializes ObjectDetector module with a DriveNet module. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_isDistanceEnabled (bool *enabled, dwObjectDetectorHandle_t obj)
 Returns a boolean indicating whether DNN distance output is enabled. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_isFuseObjectsEnabled (bool *enabled, dwObjectDetectorHandle_t obj)
 Returns a boolean indicating whether object fusing is enabled. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_isObjectDepthEnabled (bool *enabled, dwObjectDetectorHandle_t obj)
 Returns a boolean indicating whether object depth output is enabled. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_isObjectUrgencyEnabled (bool *enabled, dwObjectDetectorHandle_t obj)
 Returns a boolean indicating whether DNN urgency output is enabled. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_process (dwObjectDetectorStage stage, dwObjectDetectorHandle_t obj)
 Perform object detection GPU stages. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_processDLA (dwObjectDetectorDLAStage stage, dwObjectDetectorHandle_t obj)
 Perform object detection DLA stages. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_release (dwObjectDetectorHandle_t obj)
 Releases the ObjectDetector module. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_reset (dwObjectDetectorHandle_t obj)
 Resets ObjectDetector. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_setActiveImageIndices (const uint32_t *imageMap, uint32_t numImages, dwObjectDetectorHandle_t obj)
 Set active images to infer (DW_OBJECT_DETECTOR_STAGE_GPU_ASYNC_INFERENCE) or interpret (DW_OBJECT_DETECTOR_STAGE_GPU_ASYNC_INTERPRET_DETECTIONS).The detector can hold multiple images but only need to process a subset of them. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_setCoverageThreshold (float32_t covThreshold, dwObjectClass objectClass, dwObjectDetectorHandle_t obj)
 Set coverage threshold for a given class. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_setCUDAStream (cudaStream_t stream, dwObjectDetectorHandle_t obj)
 Sets the CUDA stream used. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_setEnableFuseObjects (bool enable, dwObjectDetectorHandle_t obj)
 Enables or disables objectFusing. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_setOutputMask (const uint8_t *mask, uint32_t maskWidth, uint32_t maskHeight, dwObjectClass objectClass, dwObjectDetectorHandle_t obj)
 Set output mask. More...
 
DW_API_PUBLIC dwStatus dwObjectDetector_setROI (uint32_t imageIdx, const dwRect *ROI, const dwTransformation2f *outputToObject, dwObjectDetectorHandle_t obj)
 Sets the region of interest for an image at given index, and the 2D transformation from the image coordinate system to object coordinate system. More...
 

Data Structure Documentation

◆ dwObjectDetectorParams

struct dwObjectDetectorParams
Data Fields
bool enableBoundingBoxClipping If enableBoundingBoxClipping is set to true, the bounding boxes are clipped to the image edges.

Default is true since it has been used during training.

bool enableFuseObjects If enableFuseObjects is set to true, all the objects proposals coming from all the images are treated as a single list of proposals.

Clustering is applied to this entire list, which results in a single list of objects. Default is false.

uint32_t maxNumImages Maximum number of images (cannot be larger than DW_DETECTOR_MAX_IMAGES). Default is 1.
dwRect ROIs[DW_OBJECT_DETECTOR_MAX_IMAGES] Region of interest for each image at the corresponding index.

The image is cropped at the given ROI. The cropped region is then be scaled while keeping the aspect ratio and is padded to have the right size for DNN. Default ROI is the whole image.

uint32_t sensorId camera sensor id of the camera the detector runs on
dwTransformation2f transformations[DW_OBJECT_DETECTOR_MAX_IMAGES] List of transformations from each image coordinate system to object coordinate system at the corresponding image index.

By default, the transformation matrices are identity.

Macro Definition Documentation

◆ DW_OBJECT_DETECTOR_MAX_IMAGES

#define DW_OBJECT_DETECTOR_MAX_IMAGES   4

Maximum number of images the detector can process at a time.

Definition at line 64 of file ObjectDetector.h.

Typedef Documentation

◆ dwObjectDetectorHandle_t

typedef struct dwObjectDetectorObject* dwObjectDetectorHandle_t

Handle to an object detector.

Definition at line 70 of file ObjectDetector.h.

Enumeration Type Documentation

◆ dwObjectDetectorDLAStage

The DLA process stages of the ObjectDetector.

Enumerator
DW_OBJECT_DETECTOR_DLA_STAGE_GPU_ASYNC_PREPROCESSING 

Input images are prepared by scaling, padding and performing 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_OBJECT_DETECTOR_DLA_STAGE_DLA_ASYNC_INFERENCE 

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

DW_OBJECT_DETECTOR_DLA_STAGE_GPU_ASYNC_INTERPRET_DETECTIONS 

After inference the GPU postprocesses the detections in device memory.

DW_OBJECT_DETECTOR_DLA_STAGE_CPU_SYNC_POSTPROCESSING 

DW_OBJECT_DETECTOR_STAGE_CPU_SYNC_POSTPROCESSING waits for the previous stage to finish processing and then performs postprocessing on the host.

Definition at line 90 of file ObjectDetector_processpipeline.h.

◆ dwObjectDetectorOutputType

The type of the detector output.

Enumerator
DW_OBJECT_DETECTOR_OUTPUT_TYPE_PROPOSAL 
DW_OBJECT_DETECTOR_OUTPUT_TYPE_DETECTION 

Definition at line 105 of file ObjectDetector.h.

◆ dwObjectDetectorStage

The GPU process stages of the ObjectDetector.

Enumerator
DW_OBJECT_DETECTOR_STAGE_GPU_ASYNC_PREPROCESSING 

Input images are prepared by scaling, padding and performing 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_OBJECT_DETECTOR_STAGE_GPU_ASYNC_INFERENCE 

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

DW_OBJECT_DETECTOR_STAGE_GPU_ASYNC_INTERPRET_DETECTIONS 

After inference the GPU postprocesses the detections in device memory.

DW_OBJECT_DETECTOR_STAGE_CPU_SYNC_POSTPROCESSING 

DW_OBJECT_DETECTOR_STAGE_CPU_SYNC_POSTPROCESSING waits for the previous stage to finish processing and then performs postprocessing on the host.

Definition at line 59 of file ObjectDetector_processpipeline.h.

Function Documentation

◆ dwObjectDetector_bindInput()

DW_API_PUBLIC dwStatus dwObjectDetector_bindInput ( const dwImageCUDA *const *  images,
uint32_t  imageCount,
dwObjectDetectorHandle_t  obj 
)

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

Parameters
[in]imagesArray storing pointers to images where the detector is to be applied.
[in]imageCountNumber of images provided in the array.
[in]objSpecifies the ObjectDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT
Note
numImages must be divisible by the batch size of the network.

◆ dwObjectDetector_bindOutput()

DW_API_PUBLIC dwStatus dwObjectDetector_bindOutput ( dwObjectArray objectArray,
uint32_t  imageIdx,
dwObjectClass  objectClass,
dwObjectDetectorOutputType  type,
dwObjectDetectorHandle_t  obj 
)

Bind the ouput of the detector to array of objects.

Parameters
[in,out]objectArrayPointer to an object array structure.
[in]imageIdxThe image index for the list.
[in]objectClassThe class for the list.
[in]typeThe type of the output
[in]objSpecifies the ObjectDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwObjectDetector_clearOutputMask()

DW_API_PUBLIC dwStatus dwObjectDetector_clearOutputMask ( dwObjectClass  objectClass,
dwObjectDetectorHandle_t  obj 
)

Clears output mask.

Parameters
[in]objectClassThe class of the object
[in]objA pointer to the ObjectDetector handle that is updated
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwObjectDetector_detectObjects()

DW_API_PUBLIC dwStatus dwObjectDetector_detectObjects ( dwObjectArray detections,
const dwImageCUDA image,
dwObjectDetectorHandle_t  obj 
)

Detects objects from the given input image.

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

Parameters
[out]detectionsDetections will be stored in this dwObjectArray. The array has to be previously initialized with the type DW_OBJECT_TYPE_CAMERA. The array will contain detections of all classes supported by the detector.
[in]imageInput image to detect objects from.
[in]objSpecifies the ObjectDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwObjectDetector_getCoverageThreshold()

DW_API_PUBLIC dwStatus dwObjectDetector_getCoverageThreshold ( float32_t covThreshold,
dwObjectClass  objectClass,
dwObjectDetectorHandle_t  obj 
)

Get coverage threshold for a given class.

Parameters
[out]covThresholdCoverage threshold in [0.0, 1.0]
[in]objectClassThe class for which the coverage threshold should be returned.
[in]objA pointer to the ObjectDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwObjectDetector_getCUDAStream()

DW_API_PUBLIC dwStatus dwObjectDetector_getCUDAStream ( cudaStream_t *  stream,
dwObjectDetectorHandle_t  obj 
)

Gets the CUDA stream used.

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

◆ dwObjectDetector_getOutputMaskDimensions()

DW_API_PUBLIC dwStatus dwObjectDetector_getOutputMaskDimensions ( uint32_t *  width,
uint32_t *  height,
dwObjectDetectorHandle_t  obj 
)

Returns output mask dimensions.

Parameters
[out]widthOutput mask width.
[out]heightOutput mask height.
[in]objSpecifies the ObjectDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwObjectDetector_getROI()

DW_API_PUBLIC dwStatus dwObjectDetector_getROI ( dwRect ROI,
dwTransformation2f outputToObject,
uint32_t  imageIdx,
dwObjectDetectorHandle_t  obj 
)

Returns the region of interest and the 2D transformation from the image coordinate system to object coordinate system at given index.

Parameters
[out]ROIRegion of interest to be fed as input to network.
[out]outputToObject2D Transformation from output of the network to object coordinate system.
[in]imageIdxIndex of the image for which to set ROI and transformation.
[in]objSpecifies the ObjectDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwObjectDetector_initDefaultParams()

DW_API_PUBLIC dwStatus dwObjectDetector_initDefaultParams ( dwObjectDetectorParams detectorParams)

Initializes ObjectDetector parameters with default values.

Parameters
[out]detectorParamsObjectDetector parameters.
Returns
DW_SUCCESS, DW_INVALID_ARGUMENT

◆ dwObjectDetector_initializeFromDriveNet()

DW_API_PUBLIC dwStatus dwObjectDetector_initializeFromDriveNet ( dwObjectDetectorHandle_t obj,
const dwObjectDetectorParams detectorParams,
dwDriveNetHandle_t  drivenet,
dwContextHandle_t  ctx 
)

Initializes ObjectDetector module with a DriveNet module.

Parameters
[out]objA pointer to ObjectDetector handle that is initialized from parameters.
[in]detectorParamsA pointer to ObjectDetector parameters.
[in]drivenetSpecifies the handle to the DriveNet module.
[in]ctxSpecifies the handle to the context.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwObjectDetector_isDistanceEnabled()

DW_API_PUBLIC dwStatus dwObjectDetector_isDistanceEnabled ( bool *  enabled,
dwObjectDetectorHandle_t  obj 
)

Returns a boolean indicating whether DNN distance output is enabled.

Parameters
[out]enabledBoolean indicating whether DNN distance output is enabled.
[in]objA pointer to the ObjectDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwObjectDetector_isFuseObjectsEnabled()

DW_API_PUBLIC dwStatus dwObjectDetector_isFuseObjectsEnabled ( bool *  enabled,
dwObjectDetectorHandle_t  obj 
)

Returns a boolean indicating whether object fusing is enabled.

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

◆ dwObjectDetector_isObjectDepthEnabled()

DW_API_PUBLIC dwStatus dwObjectDetector_isObjectDepthEnabled ( bool *  enabled,
dwObjectDetectorHandle_t  obj 
)

Returns a boolean indicating whether object depth output is enabled.

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

◆ dwObjectDetector_isObjectUrgencyEnabled()

DW_API_PUBLIC dwStatus dwObjectDetector_isObjectUrgencyEnabled ( bool *  enabled,
dwObjectDetectorHandle_t  obj 
)

Returns a boolean indicating whether DNN urgency output is enabled.

Parameters
[out]enabledBoolean indicating whether DNN urgency output is enabled.
[in]objA pointer to the ObjectDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwObjectDetector_process()

DW_API_PUBLIC dwStatus dwObjectDetector_process ( dwObjectDetectorStage  stage,
dwObjectDetectorHandle_t  obj 
)

Perform object detection GPU stages.

Inputs and outputs must be bound before this call.

Parameters
[in]stageProcessing stage to run.
[in]objSpecifies the ObjectDetector handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS DW_NOT_SUPPORTED

◆ dwObjectDetector_processDLA()

DW_API_PUBLIC dwStatus dwObjectDetector_processDLA ( dwObjectDetectorDLAStage  stage,
dwObjectDetectorHandle_t  obj 
)

Perform object detection DLA stages.

Inputs and outputs must be bound before this call.

Parameters
[in]stageProcessing stage to run.
[in]objSpecifies the ObjectDetector handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS DW_NOT_SUPPORTED

◆ dwObjectDetector_release()

DW_API_PUBLIC dwStatus dwObjectDetector_release ( dwObjectDetectorHandle_t  obj)

Releases the ObjectDetector module.

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

◆ dwObjectDetector_reset()

DW_API_PUBLIC dwStatus dwObjectDetector_reset ( dwObjectDetectorHandle_t  obj)

Resets ObjectDetector.

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

◆ dwObjectDetector_setActiveImageIndices()

DW_API_PUBLIC dwStatus dwObjectDetector_setActiveImageIndices ( const uint32_t *  imageMap,
uint32_t  numImages,
dwObjectDetectorHandle_t  obj 
)

Set active images to infer (DW_OBJECT_DETECTOR_STAGE_GPU_ASYNC_INFERENCE) or interpret (DW_OBJECT_DETECTOR_STAGE_GPU_ASYNC_INTERPRET_DETECTIONS).The detector can hold multiple images but only need to process a subset of them.

By default, all the images provided to infer API and interpret API will be used. This function is used to assign the images that needs to be processed when detector holds multiple images but want to skip (not process) some images when infer or interpret. The integer(s) of the iput imageMap are used to index to the internal list of ROIs and post-detection transformations.

Parameters
[in]imageMapSpecifies the images needed to process.
[in]numImagesSpecifies the number of images needed to process.
[in]objSpecifies the ObjectDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT
Note
This function only affects one following infer or interpret call. Any later infer or interpret call will go back to default behavior (process all images).

◆ dwObjectDetector_setCoverageThreshold()

DW_API_PUBLIC dwStatus dwObjectDetector_setCoverageThreshold ( float32_t  covThreshold,
dwObjectClass  objectClass,
dwObjectDetectorHandle_t  obj 
)

Set coverage threshold for a given class.

Parameters
[in]covThresholdCoverage threshold in [0.0, 1.0]
[in]objectClassThe class for which the coverage threshold should be set.
[in]objA pointer to the ObjectDetector handle that is updated
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwObjectDetector_setCUDAStream()

DW_API_PUBLIC dwStatus dwObjectDetector_setCUDAStream ( cudaStream_t  stream,
dwObjectDetectorHandle_t  obj 
)

Sets the CUDA stream used.

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

◆ dwObjectDetector_setEnableFuseObjects()

DW_API_PUBLIC dwStatus dwObjectDetector_setEnableFuseObjects ( bool  enable,
dwObjectDetectorHandle_t  obj 
)

Enables or disables objectFusing.

Parameters
[in]enableBoolean indicating whether object fusing should be enabled.
[in]objA pointer to the ObjectDetector handle that is updated.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwObjectDetector_setOutputMask()

DW_API_PUBLIC dwStatus dwObjectDetector_setOutputMask ( const uint8_t *  mask,
uint32_t  maskWidth,
uint32_t  maskHeight,
dwObjectClass  objectClass,
dwObjectDetectorHandle_t  obj 
)

Set output mask.

Areas where mask==0 will be ignored during detection. The size of the mask must be the same as the network output. The required mask dimensions can be obtained via dwObjectDetector_getOutputMaskDimensions.

Parameters
[in]maskA CPU pointer to the mask data
[in]maskWidthMask width
[in]maskHeightMask height
[in]objectClassClass of the object
[in]objA pointer to the ObjectDetector handle that is updated
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
Note
Mask will be copied. Changes on the mask after this function call will not be reflected.

◆ dwObjectDetector_setROI()

DW_API_PUBLIC dwStatus dwObjectDetector_setROI ( uint32_t  imageIdx,
const dwRect ROI,
const dwTransformation2f outputToObject,
dwObjectDetectorHandle_t  obj 
)

Sets the region of interest for an image at given index, and the 2D transformation from the image coordinate system to object coordinate system.

Parameters
[in]imageIdxIndex of the image for which to set ROI and transformation.
[in]ROIRegion of interest to be fed as input to network.
[in]outputToObject2D Transformation from output of the network to object coordinate system.
[in]objSpecifies the ObjectDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT