Defines the feature array used by detector and tracker.
| Data Structures | |
| struct | dwFeatureArray | 
| struct | dwFeatureDescriptorArray | 
| Holds pointers to the data exposed by a feature2d list.  More... | |
| struct | dwFeatureHistoryArray | 
| Holds pointers to the data exposed by a feature2d list.  More... | |
| Enumerations | |
| enum | dwFeature2DStatus { DW_FEATURE2D_STATUS_INVALID = 0 , DW_FEATURE2D_STATUS_DETECTED , DW_FEATURE2D_STATUS_TRACKED , DW_FEATURE2D_STATUS_TYPE_COUNT } | 
| Defines the possible status of a feature.  More... | |
| Functions | |
| 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.  More... | |
| DW_API_PUBLIC dwStatus | dwFeatureArray_copyAsync (dwFeatureArray *dstFeatures, const dwFeatureArray *srcFeatures, cudaStream_t stream) | 
| Deep copy all contents from srcFeatures to dstFeatures.  More... | |
| DW_API_PUBLIC dwStatus | dwFeatureArray_create (dwFeatureArray *featureArray, const uint32_t maxFeatureCount, const dwMemoryType memoryType, dwContextHandle_t context) | 
| Creates and initializes a feature array.  More... | |
| 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.  More... | |
| DW_API_PUBLIC dwStatus | dwFeatureArray_destroy (dwFeatureArray featureArray) | 
| Destroys the featureArray and frees any memory created by dwFeatureArray_createNew().  More... | |
| DW_API_PUBLIC dwStatus | dwFeatureArray_reset (dwFeatureArray *featureArray, cudaStream_t stream) | 
| Resets the feature array.  More... | |
| DW_API_PUBLIC dwStatus | dwFeatureDescriptorArray_copy (dwFeatureDescriptorArray *dstDescriptors, dwFeatureDescriptorArray const *srcDescriptors) | 
| Deep copy all contents from srcDescriptors to dstDescriptors.  More... | |
| DW_API_PUBLIC dwStatus | dwFeatureDescriptorArray_copyAsync (dwFeatureDescriptorArray *dstDescriptors, dwFeatureDescriptorArray const *srcDescriptors, cudaStream_t stream) | 
| Deep copy all contents from srcDescriptors to dstDescriptors.  More... | |
| 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.  More... | |
| DW_API_PUBLIC dwStatus | dwFeatureDescriptorArray_destroy (dwFeatureDescriptorArray const *descriptorArray) | 
| Destroys the descriptor array and frees any memory created by dwDescriptorArray_create()  More... | |
| DW_API_PUBLIC dwStatus | dwFeatureHistoryArray_copyAsync (dwFeatureHistoryArray *dstFeatureHistory, const dwFeatureHistoryArray *srcFeatureHistory, cudaStream_t stream) | 
| Deep copy all contents from srcFeatureHistory to dstFeatureHistory.  More... | |
| 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.  More... | |
| 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.  More... | |
| DW_API_PUBLIC dwStatus | dwFeatureHistoryArray_destroy (dwFeatureHistoryArray featureHistoryArray) | 
| Destroys the featureHistoryArray and frees any memory created by dwFeatureHistoryArray_createNew().  More... | |
| 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.  More... | |
| DW_API_PUBLIC dwStatus | dwFeatureHistoryArray_getCurrent (dwFeatureArray *featureArray, dwFeatureHistoryArray const *featureHistoryArray) | 
| Get the latest feature snapshot(arraySize = maxFeatureCount) from history.  More... | |
| DW_API_PUBLIC dwStatus | dwFeatureHistoryArray_getPrevious (dwFeatureArray *featureArray, dwFeatureHistoryArray const *featureHistoryArray) | 
| Get the feature snapshot(arraySize = maxFeatureCount) 1 frame previous to current time.  More... | |
| DW_API_PUBLIC dwStatus | dwFeatureHistoryArray_reset (dwFeatureHistoryArray *featureHistoryArray, cudaStream_t stream) | 
| Resets the feature history array.  More... | |
| struct dwFeatureArray | 
| Data Fields | ||
|---|---|---|
| uint32_t * | ages | Age of each feature. 1D array of size maxFeatures. | 
| uint32_t * | featureCount | Total number of feature points. Single value. | 
| uint32_t * | ids | Id of each feature. 1D array of size maxFeatures. | 
| dwVector2f * | locations | Location of feature points. 2D array of size maxFeatures. | 
| uint32_t | maxFeatures | Max number of features. | 
| dwMemoryType | memoryType | Where feature array is located, GPU, CPU or pinned memory. | 
| uint32_t * | newToOldMap | New to old index map, 1D array of size maxFeatures. See more details in dwFeature2DTracker_trackFeatures. | 
| float32_t * | scales | Scale change for each feature. 1D array of size maxFeatures. | 
| uint32_t | sensorId | ID of the camera sensor for which the array was generated. Internal parameter used for NDAS. | 
| dwFeature2DStatus * | statuses | Status of each feature. 1D array of size maxFeatures. | 
| uint32_t | timeIdx | Time index, 0 means latest, N means N frames earlier to latest. | 
| uint32_t * | validTrackedCount | Valid tracked features from last frame. Single value. | 
| struct dwFeatureDescriptorArray | 
| Data Fields | ||
|---|---|---|
| size_t | bytes | Bytes of raw data. | 
| uint8_t * | data | Pointer to the raw data address. | 
| dwTrivialDataType | dataType | Descriptor data type dimension. | 
| uint8_t * | descriptors | Descriptor of feature points. 1D array of size maxFeatures*descriptorDimension. | 
| uint32_t | dimension | Descriptor dimension. | 
| uint32_t * | featureCount | Total number of feature points. Single value. | 
| uint32_t * | ids | Id of each feature. 1D array of size maxFeatures. | 
| dwVector2f * | locations | Location of feature points. 2D array of size maxFeatures. | 
| uint32_t | maxFeatures | Max number of features. | 
| dwMemoryType | memoryType | Where feature array is located, GPU, CPU or pinned memory. | 
| dwFeature2DStatus * | statuses | Status of each feature. 1D array of size maxFeatures.  | 
| struct dwFeatureHistoryArray | 
| Data Fields | ||
|---|---|---|
| uint32_t * | ages | Age of each feature. 1D array of size maxFeatures. | 
| size_t | bytes | Bytes of raw data. | 
| uint32_t | currentTimeIdx | Index that points to the latest feature records. | 
| uint8_t * | data | Pointer to the raw data address. | 
| uint32_t * | featureCount | Total number of feature points. Single value. | 
| uint32_t * | ids | Id of each feature. 1D array of size maxFeatures. | 
| dwVector2f * | locationHistory | Location history of feature points. 2D array of size maxFeatures*maxHistory. | 
| uint32_t | maxFeatures | Max number of features in one timeIdx. | 
| uint32_t | maxHistory | Max feature history size. | 
| dwMemoryType | memoryType | Where feature array is located, GPU, CPU or pinned memory. | 
| uint32_t * | newToOldMap | New to old index map, 1D array of size maxFeatures. See more details in dwFeature2DTracker_trackFeatures. | 
| float32_t * | scales | Scale change for each feature. 1D array of size maxFeatures. | 
| uint32_t | sensorId | ID of the camera sensor for which the array was generated. Internal parameter used for NDAS. | 
| dwFeature2DStatus * | statuses | Status of each feature. 1D array of size maxFeatures. | 
| uint32_t * | validTrackedCount | Valid tracked features from last frame. Single value. | 
| enum dwFeature2DStatus | 
Defines the possible status of a feature.
Definition at line 62 of file FeatureList.h.
| 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.
i.e. There're 3 working stages: A->B->C, newToOldMapC2B gives the mapping of C->B, while newToOldMapB2A gives the mapping of B->A. The final C->A mapping will be computed and output to newToOldMapC2A
| [out] | d_newToOldMapC2A | A GPU pointer to the output merged newToOldMap | 
| [in] | d_newToOldMapC2B | A GPU pointer to newToOldMap from stage C->B | 
| [in] | d_newToOldMapB2A | A GPU pointer to newToOldMap from stage B->A | 
| [in] | d_newToOldMapCount | A GPU pointer to valid number of entries in newToOldMapC2B | 
| [in] | maxFeatureCount | max number of features for newToOldMapC2A, newToOldMapC2B and newToOldMapB2A | 
| [in] | stream | Working cuda stream | 
| DW_API_PUBLIC dwStatus dwFeatureArray_copyAsync | ( | dwFeatureArray * | dstFeatures, | 
| const dwFeatureArray * | srcFeatures, | ||
| cudaStream_t | stream | ||
| ) | 
Deep copy all contents from srcFeatures to dstFeatures.
| [out] | dstFeatures | dwFeatureArray to copy to | 
| [in] | srcFeatures | dwFeatureArray to copy from | 
| [in] | stream | Working cuda stream | 
| DW_API_PUBLIC dwStatus dwFeatureArray_create | ( | dwFeatureArray * | featureArray, | 
| const uint32_t | maxFeatureCount, | ||
| const dwMemoryType | memoryType, | ||
| dwContextHandle_t | context | ||
| ) | 
Creates and initializes a feature array.
| [out] | featureArray | pointer to the dwFeatureArray is returned here. | 
| [in] | maxFeatureCount | maximum number of features that the feature array can have. | 
| [in] | memoryType | DW_FEATURE2D_MEMORY_TYPE_CUDA for CUDA array, DW_FEATURE2D_MEMORY_TYPE_CPU for CPU array, DW_FEATURE2D_MEMORY_TYPE_PINNED for pinned memory | 
| [in] | context | handle to the context under which it is created. | 
| 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.
| [out] | featureArray | pointer to the dwFeatureArray is returned here. | 
| [in] | maxFeatureCount | maximum number of features that the feature array can have. | 
| [in] | memoryType | DW_FEATURE2D_MEMORY_TYPE_CUDA for CUDA array, DW_FEATURE2D_MEMORY_TYPE_CPU for CPU array, DW_FEATURE2D_MEMORY_TYPE_PINNED for pinned memory | 
| [in] | stream | Working CUDA stream | 
| [in] | context | handle to the context under which it is created. | 
| DW_API_PUBLIC dwStatus dwFeatureArray_destroy | ( | dwFeatureArray | featureArray | ) | 
Destroys the featureArray and frees any memory created by dwFeatureArray_createNew().
| [in] | featureArray | feature array to be destroyed. | 
| DW_API_PUBLIC dwStatus dwFeatureArray_reset | ( | dwFeatureArray * | featureArray, | 
| cudaStream_t | stream | ||
| ) | 
Resets the feature array.
Sets the feature count back to zero.
| [in] | featureArray | feature array to be reset. | 
| [in] | stream | CUDA stream used to reset the feature array | 
| DW_API_PUBLIC dwStatus dwFeatureDescriptorArray_copy | ( | dwFeatureDescriptorArray * | dstDescriptors, | 
| dwFeatureDescriptorArray const * | srcDescriptors | ||
| ) | 
Deep copy all contents from srcDescriptors to dstDescriptors.
Only for CPU to CPU copy.
| [out] | dstDescriptors | dwFeatureDescriptorArray to copy to | 
| [in] | srcDescriptors | dwFeatureDescriptorArray to copy from | 
dstDescriptors or srcDescriptors is NULL. dstDescriptors.maxFeatures != srcDescriptors.maxFeatures. | DW_API_PUBLIC dwStatus dwFeatureDescriptorArray_copyAsync | ( | dwFeatureDescriptorArray * | dstDescriptors, | 
| dwFeatureDescriptorArray const * | srcDescriptors, | ||
| cudaStream_t | stream | ||
| ) | 
Deep copy all contents from srcDescriptors to dstDescriptors.
Not to use for CPU to CPU copy.
| [out] | dstDescriptors | dwFeatureDescriptorArray to copy to | 
| [in] | srcDescriptors | dwFeatureDescriptorArray to copy from | 
| [in] | stream | working cuda stream | 
dstDescriptors or srcDescriptors is NULL. dstDescriptors.maxFeatures != srcDescriptors.maxFeatures. | 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.
| [out] | descriptorArray | output pointer returned for descriptors | 
| [in] | dataType | data type of descriptor | 
| [in] | dimension | dimension of descriptor | 
| [in] | maxFeatureCount | maximum feature count for the descriptor array | 
| [in] | memoryType | DW_MEMORY_TYPE_CUDA for CUDA array, DW_MEMORY_TYPE_CPU for CPU array, DW_MEMORY_TYPE_PINNED for pinned memory | 
| [in] | stream | input cuda stream | 
| [in] | context | handle to the context under which it is created. | 
| DW_API_PUBLIC dwStatus dwFeatureDescriptorArray_destroy | ( | dwFeatureDescriptorArray const * | descriptorArray | ) | 
Destroys the descriptor array and frees any memory created by dwDescriptorArray_create()
| [in] | descriptorArray | dwFeatureDescriptorArray to be destroyed | 
| DW_API_PUBLIC dwStatus dwFeatureHistoryArray_copyAsync | ( | dwFeatureHistoryArray * | dstFeatureHistory, | 
| const dwFeatureHistoryArray * | srcFeatureHistory, | ||
| cudaStream_t | stream | ||
| ) | 
Deep copy all contents from srcFeatureHistory to dstFeatureHistory.
| [out] | dstFeatureHistory | dwFeatureHistoryArray to copy to | 
| [in] | srcFeatureHistory | dwFeatureHistoryArray to copy from | 
| [in] | stream | Working cuda stream | 
| 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.
| [out] | featureHistoryArray | pointer to the dwFeatureHistoryArray is returned here. | 
| [in] | maxFeatureCount | maximum number of features that each time slice can have. | 
| [in] | maxHistoryCapacity | maximum length of history in feature history array. There'll be maxFeatureCount*maxHistoryCapacity features totally. | 
| [in] | memoryType | DW_FEATURE2D_MEMORY_TYPE_CUDA for CUDA array, DW_FEATURE2D_MEMORY_TYPE_CPU for CPU array, DW_FEATURE2D_MEMORY_TYPE_PINNED for pinned memory | 
| [in] | context | handle to the context under which it is created. | 
| 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.
| [out] | featureHistoryArray | pointer to the dwFeatureHistoryArray is returned here. | 
| [in] | maxFeatureCount | maximum number of features that each time slice can have. | 
| [in] | maxHistoryCapacity | maximum length of history in feature history array. There'll be maxFeatureCount*maxHistoryCapacity features totally. | 
| [in] | memoryType | DW_FEATURE2D_MEMORY_TYPE_CUDA for CUDA array, DW_FEATURE2D_MEMORY_TYPE_CPU for CPU array, DW_FEATURE2D_MEMORY_TYPE_PINNED for pinned memory | 
| [in] | stream | Working CUDA stream | 
| [in] | context | handle to the context under which it is created. | 
| DW_API_PUBLIC dwStatus dwFeatureHistoryArray_destroy | ( | dwFeatureHistoryArray | featureHistoryArray | ) | 
Destroys the featureHistoryArray and frees any memory created by dwFeatureHistoryArray_createNew().
| [in] | featureHistoryArray | feature history array to be destroyed. | 
| 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.
Assuming dwFeatureHistoryArray has N valid features in current Time(t), this API returns a dwFeatureArray that contains the snapshot of those N features in Time(t-historyIdx)
| [out] | featureArray | Snapshot of the timeIdx that is historyIdx frame previous to current in feature history. | 
| [in] | historyIdx | Time index that need to be backtraced. | 
| [in] | featureHistoryArray | Complete feature history. | 
| DW_API_PUBLIC dwStatus dwFeatureHistoryArray_getCurrent | ( | dwFeatureArray * | featureArray, | 
| dwFeatureHistoryArray const * | featureHistoryArray | ||
| ) | 
Get the latest feature snapshot(arraySize = maxFeatureCount) from history.
| [out] | featureArray | Snapshot of latest time in feature history. | 
| [in] | featureHistoryArray | Complete feature history. | 
| DW_API_PUBLIC dwStatus dwFeatureHistoryArray_getPrevious | ( | dwFeatureArray * | featureArray, | 
| dwFeatureHistoryArray const * | featureHistoryArray | ||
| ) | 
Get the feature snapshot(arraySize = maxFeatureCount) 1 frame previous to current time.
Assuming dwFeatureHistoryArray has N valid features in current Time(t), this API returns a dwFeatureArray that contains the snapshot of those N features in Time(t-1).
| [out] | featureArray | Snapshot of the timeIdx that is 1 frame previous to current in feature history. | 
| [in] | featureHistoryArray | Complete feature history. | 
| DW_API_PUBLIC dwStatus dwFeatureHistoryArray_reset | ( | dwFeatureHistoryArray * | featureHistoryArray, | 
| cudaStream_t | stream | ||
| ) | 
Resets the feature history array.
Sets the feature count back to zero.
| [in] | featureHistoryArray | feature history array to be reset. | 
| [in] | stream | CUDA stream used to reset the feature history array |