Defines the image pyramid structure.
|
DW_API_PUBLIC dwStatus | dwImageFilter_computePyramid (dwPyramidImage *pyramid, const dwImageCUDA *image, cudaStream_t stream, dwContextHandle_t context) |
| Builds the pyramid from level 0 image. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_create (dwPyramidImage *pyramid, uint32_t levelCount, uint32_t width, uint32_t height, dwTrivialDataType pxlType, dwContextHandle_t context) |
| Creates and initializes an image pyramid. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_createFromProperties (dwPyramidImage *pyramid, const dwPyramidImageProperties *props, dwContextHandle_t context) |
| Creates and initializes an image pyramid. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_destroy (dwPyramidImage pyramid) |
| Destroy pyramid images. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_fillProperties (dwPyramidImageProperties *props, uint32_t levelCount, uint32_t width, uint32_t height, dwTrivialDataType pxlType) |
| Fills the pyramid image properties structure. More...
|
|
DW_API_PUBLIC dwStatus | dwPyramid_getProperties (dwPyramidImageProperties *props, dwPyramidImage *pyramid, dwContextHandle_t context) |
| Gets the properties of a pyramid image. More...
|
|
◆ dwPyramidImage
Data Fields |
uint32_t |
levelCount |
number of level images in pyramid |
dwImageHandle_t |
levelImages[DW_PYRAMID_LEVEL_MAX_COUNT] |
level image data levelImages[0] is the level 0 image which has the highest resolution levelImages[N] is the level N image, it is half the size of level N-1 image |
◆ dwPyramidImageProperties
struct dwPyramidImageProperties |
Data Fields |
uint32_t |
levelCount |
number of level images in pyramid |
dwImageProperties |
levelProps[DW_PYRAMID_LEVEL_MAX_COUNT] |
level image properties levelProps[0] refers to the level 0 image which has the highest resolution levelProps[N] refers to the level N image, it is half the size of level N-1 image |
◆ DW_PYRAMID_LEVEL_MAX_COUNT
#define DW_PYRAMID_LEVEL_MAX_COUNT 12 |
◆ dwImageFilter_computePyramid()
Builds the pyramid from level 0 image.
- Parameters
-
[in,out] | pyramid | pyramid images that will be built, must be initialized by 'dwPyramid_create' first |
[in] | image | Specifies the level 0 image which has the highest resolution |
[in] | stream | Specifies the CUDA stream to use during pyramid building. |
[in] | context | Specifies the handle to the active DW context |
- Returns
- DW_INVALID_ARGUMENT if pyramid, image or context are NULL
DW_INVALID_ARGUMENT if width/height of input 'image' differs from the one in 'dwPyramid_create'
DW_BAD_CAST if level image in pyramid has invalid types
DW_SUCCESS otherwise
- Note
- Before computing pyramid, 'dwPyramidImage' must be initialized by 'dwPyramid_create', input 'image' must have the same width/height as in 'dwPyramid_create'
◆ dwPyramid_create()
Creates and initializes an image pyramid.
- Parameters
-
[out] | pyramid | A pointer to the pyramid image will be returned here. |
[in] | levelCount | Number of levels in the pyramid |
[in] | width | Width of level 0 image |
[in] | height | Height of level 0 image |
[in] | pxlType | Data Type of pyramid, currently only 'DW_TYPE_UINT8', 'DW_TYPE_UINT16', 'DW_TYPE_FLOAT16' and 'DW_TYPE_FLOAT32' are supported |
[in] | context | Specifies the handle to the context under which it is created. |
- Returns
- DW_INVALID_ARGUMENT if pyramid or context are NULL
DW_INVALID_ARGUMENT if pxlType is unsupported
DW_INVALID_ARGUMENT if levelCount > DW_PYRAMID_LEVEL_MAX_COUNT
DW_SUCCESS otherwise
- Note
- Level 0 image has the highest resolution in all pyramid level images, level 0 image size should be the same as input image in 'dwImageFilter_buildPyramid'
◆ dwPyramid_createFromProperties()
Creates and initializes an image pyramid.
- Parameters
-
[out] | pyramid | A pointer to the pyramid image will be returned here. |
[in] | props | Properties of the pyramid image |
[in] | context | Specifies the handle to the context under which it is created. |
- Returns
- DW_INVALID_ARGUMENT if pyramid or context are NULL DW_INVALID_ARGUMENT if pxlType is unsupported DW_INVALID_ARGUMENT if levelCount > DW_PYRAMID_LEVEL_MAX_COUNT DW_SUCCESS otherwise
◆ dwPyramid_destroy()
Destroy pyramid images.
- Parameters
-
[in] | pyramid | pyramid image to be destroyed |
- Returns
- DW_INVALID_ARGUMENT if level image in pyramid contains invalid data
DW_SUCCESS otherwise.
◆ dwPyramid_fillProperties()
Fills the pyramid image properties structure.
- Parameters
-
[out] | props | A pointer to properties structure to be filled. |
[in] | levelCount | Number of levels in the pyramid |
[in] | width | Width of level 0 image |
[in] | height | Height of level 0 image |
[in] | pxlType | Data Type of pyramid, currently only 'DW_TYPE_UINT8', 'DW_TYPE_UINT16', 'DW_TYPE_FLOAT16' and 'DW_TYPE_FLOAT32' are supported |
- Returns
- DW_INVALID_ARGUMENT if props is NULL DW_INVALID_ARGUMENT if pxlType is unsupported DW_INVALID_ARGUMENT if levelCount > DW_PYRAMID_LEVEL_MAX_COUNT DW_SUCCESS otherwise
- Note
- Level 0 image has the highest resolution in all pyramid level images, level 0 image size should be the same as input image in 'dwImageFilter_buildPyramid'
◆ dwPyramid_getProperties()
Gets the properties of a pyramid image.
- Parameters
-
[out] | props | A pointer to properties structure to be filled. |
[in] | pyramid | A pointer to the pyramid image |
[in] | context | Specifies the handle to the context under which it is created. |
- Returns
- DW_INVALID_ARGUMENT if props or pyramid or context are NULL DW_SUCCESS otherwise
- Note
- Level 0 image has the highest resolution in all pyramid level images, level 0 image size should be the same as input image in 'dwImageFilter_buildPyramid'