DriveWorks SDK Reference
5.16.65 Release
For Test and Development only

FeatureList.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_FEATURES_FEATURELIST_H_
47#define DW_IMAGEPROCESSING_FEATURES_FEATURELIST_H_
48
49#include <dw/core/base/Config.h>
52#include <dw/core/base/Types.h>
53#include <dw/image/Image.h>
54
55#ifdef __cplusplus
56extern "C" {
57#endif
58
62typedef enum dwFeature2DStatus {
67
72
77
83
116{
118 uint32_t* ages;
120 uint32_t* ids;
121 uint32_t* newToOldMap;
123 uint32_t* featureCount;
126 uint32_t currentTimeIdx;
127 uint32_t maxHistory;
128 uint32_t maxFeatures;
129 uint32_t sensorId;
132 uint8_t* data;
133 size_t bytes;
137
138typedef struct dwFeatureArray
139{
141 uint32_t* ages;
143 uint32_t* ids;
144 uint32_t* newToOldMap;
146 uint32_t* featureCount;
149 uint32_t timeIdx;
150 uint32_t maxFeatures;
151 uint32_t sensorId;
155
161{
164 uint32_t* ids;
165 uint8_t* descriptors;
166 uint32_t* featureCount;
169 uint32_t dimension;
170 uint32_t maxFeatures;
172 uint8_t* data;
173 size_t bytes;
178// dwFeature2DList
194DW_DEPRECATED("WARNING: will be removed in the next major release, use dwFeatureArray_createNew instead")
196 const uint32_t maxFeatureCount,
197 const dwMemoryType memoryType,
198 dwContextHandle_t context);
199
217 const uint32_t maxFeatureCount,
218 const dwMemoryType memoryType,
219 cudaStream_t stream,
220 dwContextHandle_t context);
221
235
248 cudaStream_t stream);
249
262 const dwFeatureArray* srcFeatures,
263 cudaStream_t stream);
264
280DW_DEPRECATED("WARNING: will be removed in the next major release, use dwFeatureHistoryArray_createNew instead")
282 const uint32_t maxFeatureCount,
283 const uint32_t maxHistoryCapacity,
284 const dwMemoryType memoryType,
285 dwContextHandle_t context);
286
304 const uint32_t maxFeatureCount,
305 const uint32_t maxHistoryCapacity,
306 const dwMemoryType memoryType,
307 cudaStream_t stream,
308 dwContextHandle_t context);
309
320
333 cudaStream_t stream);
334
348 dwFeatureHistoryArray const* featureHistoryArray);
349
366 dwFeatureHistoryArray const* featureHistoryArray);
367
385 const uint32_t historyIdx,
386 dwFeatureHistoryArray const* featureHistoryArray);
387
401 const dwFeatureHistoryArray* srcFeatureHistory,
402 cudaStream_t stream);
420dwStatus dwFeature_mergeNewToOldMap(uint32_t* d_newToOldMapC2A,
421 const uint32_t* d_newToOldMapC2B,
422 const uint32_t* d_newToOldMapB2A,
423 const uint32_t* d_newToOldMapCount,
424 const uint32_t maxFeatureCount,
425 cudaStream_t stream);
426
445 dwTrivialDataType const dataType,
446 uint32_t const dimension,
447 uint32_t const maxFeatureCount,
448 dwMemoryType const memoryType,
449 cudaStream_t stream,
450 dwContextHandle_t context);
451
462
478 dwFeatureDescriptorArray const* srcDescriptors,
479 cudaStream_t stream);
480
492 dwFeatureDescriptorArray const* srcDescriptors);
493
494#ifdef __cplusplus
495}
496#endif
498#endif // DW_IMAGEPROCESSING_FEATURES_FEATURELIST_H_
NVIDIA DriveWorks API: Core Methods
dwStatus
Status definition.
Definition: ErrorDefs.h:44
NVIDIA DriveWorks API: Core Types
NVIDIA DriveWorks API: Core Exports
float float32_t
Specifies POD types.
Definition: BasicTypes.h:59
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: BasicTypes.h:65
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:86
#define DW_DEPRECATED(msg)
Definition: Exports.h:68
#define DW_API_PUBLIC
Definition: Exports.h:56
dwMemoryType
Memory type definitions.
Definition: TypesExtra.h:148
dwTrivialDataType
Specifies a type indicator of the underlying trivial data type.
Definition: TypesExtra.h:58
dwMemoryType memoryType
Where feature array is located, GPU, CPU or pinned memory.
Definition: FeatureList.h:153
uint32_t sensorId
ID of the camera sensor for which the array was generated.
Definition: FeatureList.h:151
uint32_t maxHistory
Max feature history size.
Definition: FeatureList.h:127
float32_t * scales
Scale change for each feature.
Definition: FeatureList.h:142
float32_t * scales
Scale change for each feature.
Definition: FeatureList.h:119
dwVector2f * locations
Location of feature points.
Definition: FeatureList.h:163
uint32_t * validTrackedCount
Valid tracked features from last frame.
Definition: FeatureList.h:124
dwMemoryType memoryType
Where feature array is located, GPU, CPU or pinned memory.
Definition: FeatureList.h:135
dwTime_t timestamp
Timestamp of the dwFeatureHistoryArray struct, which is the timestamp of the latest image frame being...
Definition: FeatureList.h:130
dwFeature2DStatus * statuses
Status of each feature.
Definition: FeatureList.h:140
uint32_t timeIdx
Time index, 0 means latest, N means N frames earlier to latest.
Definition: FeatureList.h:149
size_t bytes
Bytes of raw data.
Definition: FeatureList.h:173
uint8_t * data
Pointer to the raw data address.
Definition: FeatureList.h:172
uint32_t * ages
Age of each feature.
Definition: FeatureList.h:118
uint32_t * ids
Id of each feature.
Definition: FeatureList.h:143
uint32_t * featureCount
Total number of feature points.
Definition: FeatureList.h:146
dwVector2f * locations
Location of feature points.
Definition: FeatureList.h:145
uint32_t sensorId
ID of the camera sensor for which the array was generated.
Definition: FeatureList.h:129
uint32_t dimension
Descriptor dimension.
Definition: FeatureList.h:169
uint32_t * newToOldMap
New to old index map, 1D array of size maxFeatures.
Definition: FeatureList.h:144
dwTrivialDataType dataType
Descriptor data type dimension.
Definition: FeatureList.h:168
uint32_t maxFeatures
Max number of features in one timeIdx.
Definition: FeatureList.h:128
uint32_t * featureCount
Total number of feature points.
Definition: FeatureList.h:166
dwVector2f * locationHistory
Location history of feature points.
Definition: FeatureList.h:122
uint32_t * ids
Id of each feature.
Definition: FeatureList.h:164
uint32_t * featureCount
Total number of feature points.
Definition: FeatureList.h:123
uint32_t * validTrackedCount
Valid tracked features from last frame.
Definition: FeatureList.h:147
dwFeature2DStatus * statuses
Status of each feature.
Definition: FeatureList.h:117
uint32_t * ids
Id of each feature.
Definition: FeatureList.h:120
uint32_t * ages
Age of each feature.
Definition: FeatureList.h:141
uint32_t maxFeatures
Max number of features.
Definition: FeatureList.h:170
size_t bytes
Bytes of raw data.
Definition: FeatureList.h:133
uint32_t currentTimeIdx
Index that points to the latest feature records.
Definition: FeatureList.h:126
uint32_t * newToOldMap
New to old index map, 1D array of size maxFeatures.
Definition: FeatureList.h:121
uint8_t * data
Pointer to the raw data address.
Definition: FeatureList.h:132
uint8_t * descriptors
Descriptor of feature points.
Definition: FeatureList.h:165
dwMemoryType memoryType
Where feature array is located, GPU, CPU or pinned memory.
Definition: FeatureList.h:175
uint32_t maxFeatures
Max number of features.
Definition: FeatureList.h:150
dwFeature2DStatus * statuses
Status of each feature.
Definition: FeatureList.h:162
DW_API_PUBLIC dwStatus dwFeatureDescriptorArray_copyAsync(dwFeatureDescriptorArray *dstDescriptors, dwFeatureDescriptorArray const *srcDescriptors, cudaStream_t stream)
Deep copy all contents from srcDescriptors to dstDescriptors.
DW_API_PUBLIC dwStatus dwFeatureArray_createNew(dwFeatureArray *featureArray, const uint32_t maxFeatureCount, const dwMemoryType memoryType, cudaStream_t stream, dwContextHandle_t context)
Creates and initializes a feature array.
DW_API_PUBLIC dwStatus dwFeatureHistoryArray_destroy(dwFeatureHistoryArray featureHistoryArray)
Destroys the featureHistoryArray and frees any memory created by dwFeatureHistoryArray_createNew().
DW_API_PUBLIC dwStatus dwFeatureHistoryArray_get(dwFeatureArray *featureArray, const uint32_t historyIdx, dwFeatureHistoryArray const *featureHistoryArray)
Get the feature snapshot(arraySize = maxFeatureCount) historyIdx-th frame earlier.
dwFeature2DStatus
Defines the possible status of a feature.
Definition: FeatureList.h:62
DW_API_PUBLIC dwStatus dwFeature_mergeNewToOldMap(uint32_t *d_newToOldMapC2A, const uint32_t *d_newToOldMapC2B, const uint32_t *d_newToOldMapB2A, const uint32_t *d_newToOldMapCount, const uint32_t maxFeatureCount, cudaStream_t stream)
Merge newToOldMap from 2 inputs.
DW_API_PUBLIC dwStatus dwFeatureArray_copyAsync(dwFeatureArray *dstFeatures, const dwFeatureArray *srcFeatures, cudaStream_t stream)
Deep copy all contents from srcFeatures to dstFeatures.
DW_API_PUBLIC dwStatus dwFeatureDescriptorArray_destroy(dwFeatureDescriptorArray const *descriptorArray)
Destroys the descriptor array and frees any memory created by dwDescriptorArray_create()
DW_API_PUBLIC dwStatus dwFeatureDescriptorArray_create(dwFeatureDescriptorArray *descriptorArray, dwTrivialDataType const dataType, uint32_t const dimension, uint32_t const maxFeatureCount, dwMemoryType const memoryType, cudaStream_t stream, dwContextHandle_t context)
Creates descriptor array.
DW_API_PUBLIC dwStatus dwFeatureHistoryArray_copyAsync(dwFeatureHistoryArray *dstFeatureHistory, const dwFeatureHistoryArray *srcFeatureHistory, cudaStream_t stream)
Deep copy all contents from srcFeatureHistory to dstFeatureHistory.
DW_API_PUBLIC dwStatus dwFeatureHistoryArray_createNew(dwFeatureHistoryArray *featureHistoryArray, const uint32_t maxFeatureCount, const uint32_t maxHistoryCapacity, const dwMemoryType memoryType, cudaStream_t stream, dwContextHandle_t context)
Creates and initializes a feature history array.
DW_API_PUBLIC dwStatus dwFeatureArray_reset(dwFeatureArray *featureArray, cudaStream_t stream)
Resets the feature array.
DW_API_PUBLIC dwStatus dwFeatureHistoryArray_reset(dwFeatureHistoryArray *featureHistoryArray, cudaStream_t stream)
Resets the feature history array.
DW_API_PUBLIC dwStatus dwFeatureArray_destroy(dwFeatureArray featureArray)
Destroys the featureArray and frees any memory created by dwFeatureArray_createNew().
DW_API_PUBLIC dwStatus dwFeatureArray_create(dwFeatureArray *featureArray, const uint32_t maxFeatureCount, const dwMemoryType memoryType, dwContextHandle_t context)
Creates and initializes a feature array.
DW_API_PUBLIC dwStatus dwFeatureDescriptorArray_copy(dwFeatureDescriptorArray *dstDescriptors, dwFeatureDescriptorArray const *srcDescriptors)
Deep copy all contents from srcDescriptors to dstDescriptors.
DW_API_PUBLIC dwStatus dwFeatureHistoryArray_create(dwFeatureHistoryArray *featureHistoryArray, const uint32_t maxFeatureCount, const uint32_t maxHistoryCapacity, const dwMemoryType memoryType, dwContextHandle_t context)
Creates and initializes a feature history array.
DW_API_PUBLIC dwStatus dwFeatureHistoryArray_getCurrent(dwFeatureArray *featureArray, dwFeatureHistoryArray const *featureHistoryArray)
Get the latest feature snapshot(arraySize = maxFeatureCount) from history.
DW_API_PUBLIC dwStatus dwFeatureHistoryArray_getPrevious(dwFeatureArray *featureArray, dwFeatureHistoryArray const *featureHistoryArray)
Get the feature snapshot(arraySize = maxFeatureCount) 1 frame previous to current time.
@ DW_FEATURE2D_STATUS_DETECTED
The feature was just detected in the current frame.
Definition: FeatureList.h:71
@ DW_FEATURE2D_STATUS_INVALID
A feature with this entry is garbage.
Definition: FeatureList.h:66
@ DW_FEATURE2D_STATUS_TRACKED
The feature was successfully tracked in the current frame.
Definition: FeatureList.h:76
@ DW_FEATURE2D_STATUS_TYPE_COUNT
Number of different dwFeature2DStatus enum type, mark as enum end.
Definition: FeatureList.h:81
Holds pointers to the data exposed by a feature2d list.
Definition: FeatureList.h:161
Holds pointers to the data exposed by a feature2d list.
Definition: FeatureList.h:116
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
Defines a two-element single-precision floating-point vector.
Definition: MatrixTypes.h:48