Defines the image pyramid structure and functionality used for tracking.
|
DW_API_PUBLIC dwStatus | dwPyramid_build (const dwImageCUDA *image, dwPyramidHandle_t obj) |
| Builds the pyramid from the level 0 image. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_getCUDAStream (cudaStream_t *stream, dwConstPyramidHandle_t obj) |
| Gets the CUDA stream used by the pyramid. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_getLevelCount (uint32_t *levelCount, dwConstPyramidHandle_t obj) |
| Gets the number of levels in the pyramid. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_getLevelData (uint8_t **d_data, size_t *strideBytes, const uint32_t level, dwPyramidHandle_t obj) |
| Gets the data of a level in the pyramid. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_getLevelImageCUDA (const dwImageCUDA **img, const uint32_t level, dwConstPyramidHandle_t obj) |
| Gets the data of a level in the const pyramid as a dwImageCUDA. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_getLevelSize (uint32_t *width, uint32_t *height, const uint32_t level, dwConstPyramidHandle_t obj) |
| Gets the size of a level in the pyramid. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_initialize (dwPyramidHandle_t *obj, dwContextHandle_t context, cudaStream_t stream, const dwPyramidConfig config) |
| Creates and initializes an image pyramid. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_release (dwPyramidHandle_t *obj) |
| Releases the pyramid. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_reset (dwPyramidHandle_t obj) |
| Resets a pyramid. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_setCUDAStream (cudaStream_t stream, dwPyramidHandle_t obj) |
| Sets the CUDA stream for CUDA related operations. More...
|
|
◆ dwPyramidConfig
Data Fields |
dwTrivialDataType |
dataType |
Data Type of pyramid. |
uint32_t |
height |
Height of level 0. |
uint32_t |
levelCount |
Number of levels in the pyramid. |
uint32_t |
width |
Width of level 0. |
◆ dwPyramid_build()
Builds the pyramid from the level 0 image.
- Parameters
-
[in] | image | Specifies the level 0 image. |
[in] | obj | Specifies the pyramid handle where the pyramid will be built. |
- Returns
- DW_INVALID_ARGUMENT if pyramid handle or image are NULL or pyramid handle is invalid.
DW_SUCCESS otherwise.
◆ dwPyramid_getCUDAStream()
Gets the CUDA stream used by the pyramid.
- Parameters
-
[out] | stream | The CUDA stream currently used. |
[in] | obj | A handle to the pyramid module. |
- Returns
- DW_INVALID_ARGUMENT if pyramid handle or stream are NULL.
DW_SUCCESS otherwise.
◆ dwPyramid_getLevelCount()
Gets the number of levels in the pyramid.
- Parameters
-
[out] | levelCount | A pointer to the number of levels will be returned here. |
[in] | obj | Specifies the pyramid handle. |
- Returns
- DW_INVALID_ARGUMENT if pyramid handle or levelCount are NULL.
DW_SUCCESS otherwise.
◆ dwPyramid_getLevelData()
Gets the data of a level in the pyramid.
- Parameters
-
[out] | d_data | A GPU pointer to the data of the level. |
[out] | strideBytes | A pointer to the stride of each row of the level data, in bytes. |
[in] | level | Specifies the level number to get the data for. |
[in] | obj | Specifies the pyramid handle. |
- Returns
- DW_INVALID_ARGUMENT if pyramid handle, d_data or strideBytes are NULL or level is out of range.
DW_SUCCESS otherwise.
◆ dwPyramid_getLevelImageCUDA()
Gets the data of a level in the const pyramid as a dwImageCUDA.
- Parameters
-
[out] | img | A pointer to a dwImageCUDA that maps to a level of the pyramid. |
[in] | level | Specifies the level number to get the data for. |
[in] | obj | Specifies the pyramid handle. |
- Returns
- DW_INVALID_ARGUMENT if pyramid handle or img are NULL or level is out of range.
DW_SUCCESS otherwise.
◆ dwPyramid_getLevelSize()
Gets the size of a level in the pyramid.
- Parameters
-
[out] | width | A pointer to the width of the level. |
[out] | height | A pointer to the height of the level. |
[in] | level | Specifies the level number to get the size for. |
[in] | obj | Specifies the pyramid handle. |
- Returns
- DW_INVALID_ARGUMENT if pyramid handle, widht or height are NULL or level is out of range.
DW_SUCCESS otherwise.
◆ dwPyramid_initialize()
Creates and initializes an image pyramid.
Level 0 of the pyramid is of size config.width x config.height. It has config.levelCount number of levels. For each level, width[n] = (width[n-1]+1)/2.
- Parameters
-
[out] | obj | A pointer to the pyramid handle will be 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 pyramid handle or context are NULL or config is invalid.
DW_SUCCESS otherwise.
◆ dwPyramid_release()
Releases the pyramid.
This method releases all resources associated with a pyramid.
- Note
- This method renders the handle unusable.
- Parameters
-
[in] | obj | A pointer to the object handle to be released. |
- Returns
- DW_INVALID_ARGUMENT if pyramid handle is NULL.
DW_SUCCESS otherwise.
◆ dwPyramid_reset()
Resets a pyramid.
- Parameters
-
[in] | obj | Specifies the pyramid handle to reset. |
- Returns
- DW_INVALID_ARGUMENT if pyramid handle is NULL.
DW_SUCCESS otherwise.
◆ dwPyramid_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 dwPyramid_initialize. |
[in] | obj | A handle to the pyramid module to set CUDA stream for. |
- Returns
- DW_INVALID_ARGUMENT if pyramid handle is NULL.
DW_SUCCESS otherwise.