Defines the tracker module.
|
DW_API_PUBLIC dwStatus | dwFeatureTracker_detectNewFeatures (dwFeatureListHandle_t list, dwConstPyramidHandle_t pyramid, dwFeatureTrackerHandle_t obj) |
| Detects new features and adds them to the feature list. More...
|
|
DW_API_PUBLIC dwStatus | dwFeatureTracker_getCUDAStream (cudaStream_t *stream, dwFeatureTrackerHandle_t obj) |
| Gets the CUDA stream used by the feature tracker. More...
|
|
DW_API_PUBLIC dwStatus | dwFeatureTracker_initialize (dwFeatureTrackerHandle_t *obj, dwContextHandle_t context, cudaStream_t stream, const dwFeatureTrackerConfig config) |
| Creates and initializes a feature tracker. More...
|
|
DW_API_PUBLIC dwStatus | dwFeatureTracker_release (dwFeatureTrackerHandle_t *obj) |
| Releases the feature tracker. More...
|
|
DW_API_PUBLIC dwStatus | dwFeatureTracker_reset (dwFeatureTrackerHandle_t obj) |
| Resets a feature tracker. More...
|
|
DW_API_PUBLIC dwStatus | dwFeatureTracker_setCUDAStream (cudaStream_t stream, dwFeatureTrackerHandle_t obj) |
| Sets the CUDA stream for CUDA related operations. More...
|
|
DW_API_PUBLIC dwStatus | dwFeatureTracker_setMask (const uint8_t *d_mask, const uint32_t maskStrideBytes, const uint32_t maskWidth, const uint32_t maskHeight, dwFeatureTrackerHandle_t obj) |
| Sets a mask to ignore areas of the image. More...
|
|
DW_API_PUBLIC dwStatus | dwFeatureTracker_trackFeatures (dwFeatureListHandle_t list, dwConstPyramidHandle_t previousPyramid, dwConstPyramidHandle_t currentPyramid, const float32_t *d_predictedPositions, dwFeatureTrackerHandle_t obj) |
| Tracks features from the internal list between the previous and current images. More...
|
|
◆ dwFeatureTrackerConfig
struct dwFeatureTrackerConfig |
Data Fields |
float32_t |
detectorScoreThreshold |
Higher thresholds detect less features. |
uint32_t |
imageHeight |
|
uint32_t |
imageWidth |
|
uint32_t |
interationsLK |
Upper bound on number of Lucas-Kanade iterations per level. |
uint32_t |
maxFeatureCount |
Upper bound on number of features handled. |
uint32_t |
windowSizeLK |
Window size used in the Lucas-Kanade tracker. Supported sizes are 6,8,10,12,14.
|
◆ dwFeatureTracker_detectNewFeatures()
Detects new features and adds them to the feature list.
Features are added only in areas where the mask!=0xff and where features are not currently being tracked.
- Parameters
-
[in] | list | Specifies the feature list where new features are stored. |
[in] | pyramid | Specifies the pryamid on which feature detection takes place. |
[in] | obj | Specifies the object handle. |
- Returns
- DW_INVALID_ARGUMENT if feature tracker handle or feature list handle or pyramid handle are NULL.
DW_SUCCESS otherwise.
◆ dwFeatureTracker_getCUDAStream()
Gets the CUDA stream used by the feature tracker.
- Parameters
-
[out] | stream | The CUDA stream currently used. |
[in] | obj | A handle to the feature tracker module. |
- Returns
- DW_INVALID_ARGUMENT if feature tracker handle or stream are NULL.
DW_SUCCESS otherwise.
◆ dwFeatureTracker_initialize()
Creates and initializes a feature tracker.
- Parameters
-
[out] | obj | A pointer to the feature tracker handle is returned here. |
[in] | context | Specifies the handle to the context under which it is created. |
[in] | stream | Specifies the CUDA stream to use for pyramid operations. |
[in] | config | Specifies the configuration parameters. |
- Returns
- DW_INVALID_ARGUMENT if feature tracker handle or context are NULL or config is invalid.
DW_SUCCESS otherwise.
◆ dwFeatureTracker_release()
Releases the feature tracker.
This method releases all resources associated with a feature tracker.
- Note
- This method renders the handle unusable.
- Parameters
-
[in] | obj | A pointer to the object handle to be released. |
- Returns
- DW_INVALID_ARGUMENT if feature tracker handle is NULL.
DW_SUCCESS otherwise.
◆ dwFeatureTracker_reset()
Resets a feature tracker.
- Parameters
-
[in] | obj | Specifies the feature tracker handle to be reset. |
- Returns
- DW_INVALID_ARGUMENT if feature tracker handle is NULL.
DW_SUCCESS otherwise.
◆ dwFeatureTracker_setCUDAStream()
Sets the CUDA stream for CUDA related operations.
- Note
- The ownership of the stream remains by the callee.
- Parameters
-
[in] | stream | The CUDA stream to be used. Default is the one passed during dwFeatureTracker_initialize. |
[in] | obj | A handle to the feature tracker module to set CUDA stream for. |
- Returns
- DW_INVALID_ARGUMENT if feature tracker handle is NULL.
DW_SUCCESS otherwise.
◆ dwFeatureTracker_setMask()
Sets a mask to ignore areas of the image.
Areas where mask==0xff will not produce new features when detectNewFeatures()
is called. The size of the mask must be the same as the image.
- Parameters
-
[in] | d_mask | A GPU pointer to the mask data. |
[in] | maskStrideBytes | Specifies the stride, in bytes, for each row of the mask. |
[in] | maskWidth | Specifies the width of the mask. |
[in] | maskHeight | Specifies the height of the mask. |
[in] | obj | Specifies the object handle. |
- Returns
- DW_INVALID_ARGUMENT if feature tracker handle or d_mask are NULL or maskWidth or maskHeight are invalid.
DW_SUCCESS otherwise.
◆ dwFeatureTracker_trackFeatures()
Tracks features from the internal list between the previous and current images.
- Parameters
-
[in] | list | Specifies the list of features to be tracked and updated. |
[in] | previousPyramid | Specifies the pyramid constructed from the last image. |
[in] | currentPyramid | Specifies the pyramid constructed from the current image. |
[in] | d_predictedPositions | A GPU pointer to a list of expected positions of the features to be tracked. The indexes of this list must match the indexes of the internal feature list. if this is NULL(== 0), then use previous locations of the list as predicted positions. |
[in] | obj | Specifies the feature tracker handle. |
- Returns
- DW_INVALID_ARGUMENT if any parameter is NULL or previous and current pyramids have a different number of levels.
A specific CUDA error in case of an underlying cuda failure.
DW_SUCCESS otherwise.