DriveWorks SDK Reference
5.14.77 Release
For Test and Development only

FeatureDetector.h
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2018-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
46#ifndef DW_IMAGEPROCESSING_FEATUREDETECTOR_FEATUREDETECTOR_H_
47#define DW_IMAGEPROCESSING_FEATUREDETECTOR_FEATUREDETECTOR_H_
48
51#include <dw/core/base/Types.h>
52#include <dw/image/Image.h>
54#include <dw/imageprocessing/pyramid/Pyramid.h>
56#include <dw/core/system/PVA.h>
57
58#ifdef __cplusplus
59extern "C" {
60#endif
61
63typedef struct dwFeature2DDetectorObject* dwFeature2DDetectorHandle_t;
64
66typedef struct dwFeature2DDetectorObject const* dwConstFeature2DDetectorHandle_t;
67
74
78
82
85
87typedef enum {
90
94
97
102{
105
108 uint32_t imageWidth;
109
112 uint32_t imageHeight;
113
118
124
126 uint32_t cellSize;
127
130 uint32_t gradientSize;
131
135 uint32_t blockSize;
136
143
150
163
170
177 uint32_t harrisRadius;
178
186 uint32_t NMSRadius;
187
193
199
205
212
219
223
227
233 DW_DEPRECATED("WARNING: will be removed in the next major release")
235
240 DW_DEPRECATED("WARNING: will be removed in the next major release")
242
248
250
260
274 const dwTransformation3f* cameraToRig,
275 dwConstCameraModelHandle_t cameraHandle);
276
290 const dwFeature2DDetectorConfig* config,
291 cudaStream_t cudaStream,
292 dwContextHandle_t context);
293
304
319
339 const uint32_t maskStrideBytes,
340 const uint32_t maskWidth,
341 const uint32_t maskHeight,
343
375 dwImageHandle_t image,
376 dwFeatureArray* preTrackedFeatures,
377 const float32_t* d_normalizedCrossCorrelation,
379
410 const dwPyramidImage* pyramid,
411 dwFeatureArray* preTrackedFeatures,
412 const float32_t* d_normalizedCrossCorrelation,
414
421DW_DEPRECATED("WARNING: will be removed in the next major release, validTrackedCount pointer can be read directly from dwFeatureArray")
423dwStatus dwFeature2DDetector_getValidTrackedCount(const uint32_t** d_validTrackedCount,
425
439
451
465
477
478#ifdef __cplusplus
479}
480#endif
482#endif // DW_IMAGEPROCESSING_FEATUREDETECTOR_FEATUREDETECTOR_H_
NVIDIA DriveWorks API: Camera Methods
NVIDIA DriveWorks API: Core Methods
dwStatus
Status definition.
Definition: ErrorDefs.h:45
NVIDIA DriveWorks API: Feature Array and Feature History Array
NVIDIA DriveWorks API: cuPVA Includes
void * cupvaStream_t
Dummy definition for non PVA supported platforms.
Definition: PVA.h:47
NVIDIA DriveWorks API: Core Types
NVIDIA DriveWorks API: Core Exports
struct dwCameraModelObject const * dwConstCameraModelHandle_t
A pointer to the handle representing a const calibrated camera.
Definition: CameraModel.h:72
float float32_t
Specifies POD types.
Definition: BasicTypes.h:59
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:86
#define DW_DEPRECATED(msg)
Definition: Exports.h:66
#define DW_API_PUBLIC
Definition: Exports.h:54
dwProcessorType
Processor type definitions.
Definition: TypesExtra.h:126
uint32_t imageHeight
Height of the images that the Detector runs on.
float32_t gaussianMaskStDevY
for DW_FEATURE2D_DETECTOR_TYPE_EX only Ignored when not using DW_FEATURE2D_SELECTION_MASK_TYPE_GAUSSI...
bool autoGenerateFeatureID
Determines whether the detector generates unique feature ids for new detections automatically.
uint32_t gradientSize
for DW_PROCESSOR_TYPE_PVA_0 or DW_PROCESSOR_TYPE_PVA_1 only Gradient window size.
bool isMaskAdjustmentEnabled
for DW_FEATURE2D_DETECTOR_TYPE_EX only Switch to use mask adjusment
float32_t gaussianMaskCenterX
for DW_FEATURE2D_DETECTOR_TYPE_EX only Ignored when not using DW_FEATURE2D_SELECTION_MASK_TYPE_GAUSSI...
uint32_t harrisRadius
for DW_FEATURE2D_DETECTOR_TYPE_EX only STD detector use fixed harrisRadius = 1.
uint32_t maxFeatureCount
Upper bound on number of features handled.
float32_t gaussianMaskCenterY
for DW_FEATURE2D_DETECTOR_TYPE_EX only Ignored when not using DW_FEATURE2D_SELECTION_MASK_TYPE_GAUSSI...
uint32_t cellSize
Cell size in pixel to split the image into cells.
uint32_t blockSize
for DW_PROCESSOR_TYPE_PVA_0 or DW_PROCESSOR_TYPE_PVA_1 only Block window size used to compute the Har...
uint32_t imageWidth
Width of the images that the Detector runs on.
bool useHalf
for DW_FEATURE2D_DETECTOR_TYPE_EX only use half-precision floating point to calculate harris corner s...
dwFeature2DSelectionMaskType maskType
for DW_FEATURE2D_DETECTOR_TYPE_EX only STD detector always output UNIFORM distribution.
uint32_t NMSRadius
for DW_FEATURE2D_DETECTOR_TYPE_EX and DW_FEATURE2D_DETECTOR_TYPE_FAST9 STD detector use fixed NMSRadi...
uint32_t detectionLevel
for DW_FEATURE2D_DETECTOR_TYPE_EX only STD detector always detects on level 0 pyramid image.
float32_t gaussianMaskStDevX
for DW_FEATURE2D_DETECTOR_TYPE_EX only Ignored when not using DW_FEATURE2D_SELECTION_MASK_TYPE_GAUSSI...
dwProcessorType processorType
for DW_FEATURE2D_DETECTOR_TYPE_STD only set to DW_PROCESSOR_TYPE_PVA_0 or DW_PROCESSOR_TYPE_PVA_1 to ...
dwFeature2DDetectorType type
Detecting algorithm defined by dwFeature2DDetectorType
uint32_t numEvenDistributionPerCell
for DW_FEATURE2D_DETECTOR_TYPE_STD only Number of features to be appended after high frequency points...
bool useNewToOldMapFromPreTracked
Determines whether the detector uses dwFeatureArray::newToOldMap directly from input preTrackedFeatur...
float32_t detailThreshold
for DW_FEATURE2D_DETECTOR_TYPE_STD only features in the cell that have scores higher than this value ...
float32_t harrisK
Weigting K of the harris corner score defined as det(M) - K * trace(M) * trace(M),...
float32_t scoreThreshold
Threshold to filter out low latency points.
DW_API_PUBLIC dwStatus dwFeature2DDetector_initDefaultParamsForCamera(dwFeature2DDetectorConfig *params, const dwTransformation3f *cameraToRig, dwConstCameraModelHandle_t cameraHandle)
Initializes dwFeature2DDetector parameters with values best suited for the given camera using camera ...
DW_API_PUBLIC dwStatus dwFeature2DDetector_getValidTrackedCount(const uint32_t **d_validTrackedCount, dwFeature2DDetectorHandle_t obj)
dwFeature2DDetector_getValidTrackedCount
DW_API_PUBLIC dwStatus dwFeature2DDetector_detectFromPyramid(dwFeatureArray *outputDetections, const dwPyramidImage *pyramid, dwFeatureArray *preTrackedFeatures, const float32_t *d_normalizedCrossCorrelation, dwFeature2DDetectorHandle_t obj)
Detects new features and append them after old tracked features.
DW_API_PUBLIC dwStatus dwFeature2DDetector_setPVAStream(cupvaStream_t stream, dwFeature2DDetectorHandle_t obj)
Sets the CUPVA stream for PVA related operations.
DW_API_PUBLIC dwStatus dwFeature2DDetector_getCUDAStream(cudaStream_t *stream, dwFeature2DDetectorHandle_t obj)
Gets the CUDA stream used by the feature Detector.
struct dwFeature2DDetectorObject const * dwConstFeature2DDetectorHandle_t
Handle representing a const feature detector.
DW_API_PUBLIC dwStatus dwFeature2DDetector_setCUDAStream(cudaStream_t stream, dwFeature2DDetectorHandle_t obj)
Sets the CUDA stream for CUDA related operations.
DW_API_PUBLIC dwStatus dwFeature2DDetector_detectFromImage(dwFeatureArray *outputDetections, dwImageHandle_t image, dwFeatureArray *preTrackedFeatures, const float32_t *d_normalizedCrossCorrelation, dwFeature2DDetectorHandle_t obj)
Detects new features and append them after old tracked features.
DW_API_PUBLIC dwStatus dwFeature2DDetector_release(dwFeature2DDetectorHandle_t obj)
Releases the feature Detector.
DW_API_PUBLIC dwStatus dwFeature2DDetector_setMask(const uint8_t *d_mask, const uint32_t maskStrideBytes, const uint32_t maskWidth, const uint32_t maskHeight, dwFeature2DDetectorHandle_t obj)
Sets a mask to ignore areas of the image.
DW_API_PUBLIC dwStatus dwFeature2DDetector_reset(dwFeature2DDetectorHandle_t obj)
Resets a feature Detector.
DW_API_PUBLIC dwStatus dwFeature2DDetector_initDefaultParams(dwFeature2DDetectorConfig *params)
Initializes dwFeature2DDetector parameters with default values.
DW_API_PUBLIC dwStatus dwFeature2DDetector_getPVAStream(cupvaStream_t *stream, dwFeature2DDetectorHandle_t obj)
Gets the CUPVA stream used by the feature Detector.
const uint32_t DW_FEATURES2D_DETECTOR_MAX_CELL_SIZE
DW_API_PUBLIC dwStatus dwFeature2DDetector_initialize(dwFeature2DDetectorHandle_t *obj, const dwFeature2DDetectorConfig *config, cudaStream_t cudaStream, dwContextHandle_t context)
Creates and initializes a feature Detector.
struct dwFeature2DDetectorObject * dwFeature2DDetectorHandle_t
Handle representing a feature detector.
dwFeature2DDetectorType
Defines different KLT tracking algorithms.
dwFeature2DSelectionMaskType
Feature distribution mask for extended detector.
@ DW_FEATURE2D_DETECTOR_TYPE_COUNT
@ DW_FEATURE2D_DETECTOR_TYPE_STD
Standard Harris Corner detector with fixed parameters, quicker.
@ DW_FEATURE2D_DETECTOR_TYPE_FAST9
Fast corner detector, quicker.
@ DW_FEATURE2D_DETECTOR_TYPE_EX
Extended Harris Corner detector with more configurable parameters, more flexible, better quality but ...
@ DW_FEATURE2D_SELECTION_MASK_TYPE_GAUSSIAN
output feature in 2D gaussian distribution which has more features in center area and less ones in bo...
@ DW_FEATURE2D_SELECTION_MASK_TYPE_UNIFORM
output feature in uniform distribution
@ DW_FEATURE2D_SELECTION_MASK_TYPE_COUNT
Holds configuration parameters for a feature detector.
struct dwImageObject * dwImageHandle_t
Definition: Image.h:110
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
Specifies a 3D rigid transformation.
Definition: MatrixTypes.h:186