NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release

Detailed Description

Defines the image pyramid structure.

Data Structures

struct  dwPyramidImage
 Pyramid image structure. More...
 
struct  dwPyramidImageProperties
 Pyramid image properties structure. More...
 

Macros

#define DW_PYRAMID_LEVEL_MAX_COUNT   12
 

Typedefs

typedef struct dwPyramidImage dwPyramidImage
 Pyramid image structure. More...
 
typedef struct dwPyramidImageProperties dwPyramidImageProperties
 Pyramid image properties structure. More...
 

Functions

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...
 
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 dwImageFilter_computePyramid (dwPyramidImage *pyramid, const dwImageCUDA *image, cudaStream_t stream, dwContextHandle_t context)
 Builds the pyramid from level 0 image. More...
 
enum  dwPyramidPVAState {
  DW_PYRAMID_PVA_STAGE_GPU_ASYNC_DATA_PREPARE = 0,
  DW_PYRAMID_PVA_STAGE_PVA_ASYNC_TRACK_PYRAMID = 1,
  DW_PYRAMID_PVA_STAGE_GPU_ASYNC_DATA_POSTPROCESS = 2
}
 Defines the Pyramid module. More...
 
DW_API_PUBLIC dwStatus dwPyramidPVA_bindInput (const dwImageHandle_t image, dwPyramidPVAHandle_t obj)
 Binds the input image to class member. More...
 
DW_API_PUBLIC dwStatus dwPyramidPVA_bindOutput (dwPyramidImage *pyramid, dwPyramidPVAHandle_t obj)
 Binds the initialized output pyramid to class. More...
 
DW_API_PUBLIC dwStatus dwPyramidPVA_process (dwPyramidPVAState stage, dwPyramidPVAHandle_t obj)
 Calls process functions based on the current state of execution. More...
 
typedef struct dwPyramidPVAObject * dwPyramidPVAHandle_t
 Defines the image pyramid structure. More...
 
typedef struct dwPyramidPVAParams dwPyramidPVAParams
 PVA image pyramid parameters. More...
 
DW_API_PUBLIC dwStatus dwPyramidPVA_initDefaultParams (dwPyramidPVAParams *params)
 Initializes default parameters for PVA image pyramid with default values. More...
 
DW_API_PUBLIC dwStatus dwPyramidPVA_initialize (dwPyramidPVAHandle_t *obj, dwPyramidPVAParams *params, const dwPyramidImage *pyramid, cudaStream_t cudaStream, dwContextHandle_t context)
 Initialize parameters for image pyramid. More...
 
DW_API_PUBLIC dwStatus dwPyramidPVA_reset (dwPyramidPVAHandle_t obj)
 Resets Pyramid module. More...
 
DW_API_PUBLIC dwStatus dwPyramidPVA_release (dwPyramidPVAHandle_t obj)
 Release Pyramid module. More...
 
DW_API_PUBLIC dwStatus dwPyramidPVA_computePyramid (dwPyramidImage *pyramid, const dwImageHandle_t image, cudaStream_t stream, dwPyramidPVAHandle_t obj)
 Builds the pyramid from level 0 image. More...
 
DW_API_PUBLIC dwStatus dwPyramidPVA_setCUDAStream (cudaStream_t stream, dwPyramidPVAHandle_t obj)
 Sets CUDA Stream to the given stream. More...
 
DW_API_PUBLIC dwStatus dwPyramidPVA_getCUDAStream (cudaStream_t *stream, dwPyramidPVAHandle_t obj)
 Get CUDA Stream to the used. More...
 
DW_API_PUBLIC dwStatus dwPyramidPVA_setPVAStream (cupvaStream_t stream, dwPyramidPVAHandle_t obj)
 Sets cuPVA Stream to the given stream. More...
 
DW_API_PUBLIC dwStatus dwPyramidPVA_getPVAStream (cupvaStream_t *stream, dwPyramidPVAHandle_t obj)
 Get cuPVA Stream to the used. More...
 

Macro Definition Documentation

◆ DW_PYRAMID_LEVEL_MAX_COUNT

#define DW_PYRAMID_LEVEL_MAX_COUNT   12

Definition at line 44 of file Pyramid_1.h.

Typedef Documentation

◆ dwPyramidImage

Pyramid image structure.

◆ dwPyramidImageProperties

Pyramid image properties structure.

◆ dwPyramidPVAHandle_t

typedef struct dwPyramidPVAObject* dwPyramidPVAHandle_t

Defines the image pyramid structure.

Handle to a Pyramid object.

Definition at line 49 of file PyramidPVA_1.h.

◆ dwPyramidPVAParams

PVA image pyramid parameters.

Enumeration Type Documentation

◆ dwPyramidPVAState

Defines the Pyramid module.

The dwPyramidPVAState enum represents the current state the module is in

Enumerator
DW_PYRAMID_PVA_STAGE_GPU_ASYNC_DATA_PREPARE 

Process the preprocessing part of pyramid creation on GPU.

DW_PYRAMID_PVA_STAGE_PVA_ASYNC_TRACK_PYRAMID 

Process the tracking part of pyramid creation on PVA.

DW_PYRAMID_PVA_STAGE_GPU_ASYNC_DATA_POSTPROCESS 

Process the postprocess part of pyramid creation on GPU.

Definition at line 40 of file PyramidPVA_processpipeline_1.h.

Function Documentation

◆ dwImageFilter_computePyramid()

DW_API_PUBLIC dwStatus dwImageFilter_computePyramid ( dwPyramidImage pyramid,
const dwImageCUDA image,
cudaStream_t  stream,
dwContextHandle_t  context 
)

Builds the pyramid from level 0 image.

Parameters
[in,out]pyramidpyramid images that will be built, must be initialized by 'dwPyramid_create' first
[in]imageSpecifies the level 0 image which has the highest resolution
[in]streamSpecifies the CUDA stream to use during pyramid building.
[in]contextSpecifies 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_INVALID_ARGUMENT if memory layout of input 'input' is not DW_IMAGE_MEMORY_TYPE_PITCH 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'
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwPyramid_create()

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.

Parameters
[out]pyramidA pointer to the pyramid image will be returned here.
[in]levelCountNumber of levels in the pyramid
[in]widthWidth of level 0 image
[in]heightHeight of level 0 image
[in]pxlTypeData Type of pyramid, currently only 'DW_TYPE_UINT8', 'DW_TYPE_UINT16', 'DW_TYPE_FLOAT16' and 'DW_TYPE_FLOAT32' are supported
[in]contextSpecifies 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'
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

◆ dwPyramid_createFromProperties()

DW_API_PUBLIC dwStatus dwPyramid_createFromProperties ( dwPyramidImage pyramid,
const dwPyramidImageProperties props,
dwContextHandle_t  context 
)

Creates and initializes an image pyramid.

Parameters
[out]pyramidA pointer to the pyramid image will be returned here.
[in]propsProperties of the pyramid image
[in]contextSpecifies 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
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

◆ dwPyramid_destroy()

DW_API_PUBLIC dwStatus dwPyramid_destroy ( dwPyramidImage  pyramid)

Destroy pyramid images.

Parameters
[in]pyramidpyramid image to be destroyed
Returns
DW_INVALID_ARGUMENT if level image in pyramid contains invalid data
DW_SUCCESS otherwise.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: Yes

◆ dwPyramid_fillProperties()

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.

Parameters
[out]propsA pointer to properties structure to be filled.
[in]levelCountNumber of levels in the pyramid
[in]widthWidth of level 0 image
[in]heightHeight of level 0 image
[in]pxlTypeData 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'
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwPyramid_getProperties()

DW_API_PUBLIC dwStatus dwPyramid_getProperties ( dwPyramidImageProperties props,
dwPyramidImage pyramid,
dwContextHandle_t  context 
)

Gets the properties of a pyramid image.

Parameters
[out]propsA pointer to properties structure to be filled.
[in]pyramidA pointer to the pyramid image
[in]contextSpecifies 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'
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwPyramidPVA_bindInput()

DW_API_PUBLIC dwStatus dwPyramidPVA_bindInput ( const dwImageHandle_t  image,
dwPyramidPVAHandle_t  obj 
)

Binds the input image to class member.

Parameters
[in]imageinput image of type dwImageHandle_t(Generic CUDA image) Currently the supported image type is DW_IMAGE_CUDA, the supported image formats are DW_IMAGE_FORMAT_R_UINT16.
[in]objdyramid module object
Returns
DW_INVALID_ARGUMENT if image or obj are NULL.
DW_INVALID_HANDLE if image is not a CUDA image.
DW_SUCCESS otherwise.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwPyramidPVA_bindOutput()

DW_API_PUBLIC dwStatus dwPyramidPVA_bindOutput ( dwPyramidImage pyramid,
dwPyramidPVAHandle_t  obj 
)

Binds the initialized output pyramid to class.

Parameters
[in]pyramidimage pyramid(CUDA Images)
[in]objdyramid module object
Returns
DW_INVALID_ARGUMENT if pyramid or obj are NULL.
DW_BAD_CAST if level image in pyramid has invalid types.
DW_SUCCESS otherwise.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwPyramidPVA_computePyramid()

DW_API_PUBLIC dwStatus dwPyramidPVA_computePyramid ( dwPyramidImage pyramid,
const dwImageHandle_t  image,
cudaStream_t  stream,
dwPyramidPVAHandle_t  obj 
)

Builds the pyramid from level 0 image.

Parameters
[in,out]pyramidpyramid images that will be built, must be initialized by dwPyramidPVA_create first
[in]imageSpecifies the level 0 image which has the highest resolution. Currently the supported image type is DW_IMAGE_CUDA, the supported image formats are DW_IMAGE_FORMAT_R_UINT16.
[in]streamSpecifies the CUDA stream to use during pyramid building.
[in]objSpecifies the handle to the active Pyramid Object
Returns
DW_INVALID_ARGUMENT if pyramid, image or obj are NULL.
DW_INVALID_ARGUMENT if width/height of input image differs from the one in dwPyramidPVA_create.
DW_BAD_CAST if level image in pyramid has invalid types.
DW_SUCCESS otherwise.
Note
Before computing pyramid, dwPyramidImage must be initialized by dwPyramidPVA_create, input image must have the same width/height as in dwPyramidPVA_create
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwPyramidPVA_getCUDAStream()

DW_API_PUBLIC dwStatus dwPyramidPVA_getCUDAStream ( cudaStream_t *  stream,
dwPyramidPVAHandle_t  obj 
)

Get CUDA Stream to the used.

Parameters
[out]streamcuda stream
[in]objdyramid module object
Returns
DW_INVALID_ARGUMENT if stream or obj are NULL DW_SUCCESS otherwise.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwPyramidPVA_getPVAStream()

DW_API_PUBLIC dwStatus dwPyramidPVA_getPVAStream ( cupvaStream_t stream,
dwPyramidPVAHandle_t  obj 
)

Get cuPVA Stream to the used.

Parameters
[out]streamcupva stream
[in]objdyramid module object
Returns
DW_NOT_AVAILABLE if PVA is not available on the platform.
DW_INVALID_ARGUMENT if obj is NULL DW_SUCCESS otherwise.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwPyramidPVA_initDefaultParams()

DW_API_PUBLIC dwStatus dwPyramidPVA_initDefaultParams ( dwPyramidPVAParams params)

Initializes default parameters for PVA image pyramid with default values.

Parameters
[out]paramsPVA image pyramid parameters.
Returns
DW_INVALID_ARGUMENT if params is NULL.
DW_SUCCESS otherwise.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

◆ dwPyramidPVA_initialize()

DW_API_PUBLIC dwStatus dwPyramidPVA_initialize ( dwPyramidPVAHandle_t obj,
dwPyramidPVAParams params,
const dwPyramidImage pyramid,
cudaStream_t  cudaStream,
dwContextHandle_t  context 
)

Initialize parameters for image pyramid.

Parameters
[out]objA pointer to handle that is initialized with parameters.
[in]paramsImage pyramid parameters.
[in]pyramidthe sample allocated output buffer with correct size information.
[in]cudaStreamthe CUDA stream to use for cuda operations.
[in]contextSpecifies the handle to the context under which it is created.
Returns
DW_INVALID_ARGUMENT if obj, params or context are NULL.
DW_SUCCESS otherwise.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

◆ dwPyramidPVA_process()

DW_API_PUBLIC dwStatus dwPyramidPVA_process ( dwPyramidPVAState  stage,
dwPyramidPVAHandle_t  obj 
)

Calls process functions based on the current state of execution.

Parameters
[in]stagecurrent execution state
[in]objdyramid module object
Returns
DW_INVALID_ARGUMENT if obj is NULL or stage is invalid.
DW_SUCCESS otherwise.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwPyramidPVA_release()

DW_API_PUBLIC dwStatus dwPyramidPVA_release ( dwPyramidPVAHandle_t  obj)

Release Pyramid module.

Parameters
[in]objHandle to reset.
Returns
DW_INVALID_ARGUMENT if obj is NULL.
DW_SUCCESS otherwise.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: Yes

◆ dwPyramidPVA_reset()

DW_API_PUBLIC dwStatus dwPyramidPVA_reset ( dwPyramidPVAHandle_t  obj)

Resets Pyramid module.

Parameters
[in]objHandle to reset.
Returns
DW_INVALID_ARGUMENT if obj is NULL.
DW_SUCCESS otherwise.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwPyramidPVA_setCUDAStream()

DW_API_PUBLIC dwStatus dwPyramidPVA_setCUDAStream ( cudaStream_t  stream,
dwPyramidPVAHandle_t  obj 
)

Sets CUDA Stream to the given stream.

Parameters
[in]streamcuda stream
[in]objdyramid module object
Returns
DW_INVALID_ARGUMENT if obj is NULL DW_SUCCESS otherwise.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwPyramidPVA_setPVAStream()

DW_API_PUBLIC dwStatus dwPyramidPVA_setPVAStream ( cupvaStream_t  stream,
dwPyramidPVAHandle_t  obj 
)

Sets cuPVA Stream to the given stream.

Parameters
[in]streamcupva stream
[in]objdyramid module object
Returns
DW_NOT_AVAILABLE if PVA is not available on the platform.
DW_INVALID_ARGUMENT if obj is NULL DW_SUCCESS otherwise.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes