DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

Stereo PVA Interface

Detailed Description

Runs the stereo pipeline and computes disparity map on PVA.

Note
SW Release Applicability: These APIs are available in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.

Data Structures

struct  dwStereoPVAParams
 Configuration parameters for a Stereo algorithm. More...
 

Typedefs

typedef struct dwStereoPVAObject * dwStereoPVAHandle_t
 A pointer to the handle representing a stereo algorithm on PVA. More...
 

Enumerations

enum  dwStereoPVAMode {
  DW_STEREO_PVA_MODE_MEDIUM_QUALITY = 0,
  DW_STEREO_PVA_MODE_LOW_QUALITY = 1,
  DW_STEREO_PVA_MODE_HIGH_QUALITY = 2
}
 Stereo computation modes. More...
 

Functions

DW_API_PUBLIC dwStatus dwStereoPVA_computeDisparity (dwImageHandle_t disparityMap, dwImageHandle_t confidenceMap, const dwImageHandle_t leftImage, const dwImageHandle_t rightImage, dwStereoPVAHandle_t obj)
 Executes the full pipeline and computes disparity map. More...
 
DW_API_PUBLIC dwStatus dwStereoPVA_getConfidenceImageProperties (dwImageProperties *props, dwStereoPVAHandle_t obj)
 Get output confidence image properties. More...
 
DW_API_PUBLIC dwStatus dwStereoPVA_getCUDAStream (cudaStream_t *stream, dwStereoPVAHandle_t obj)
 Gets CUDA stream used by the stereo algorithm. More...
 
DW_API_PUBLIC dwStatus dwStereoPVA_getDisparityImageProperties (dwImageProperties *props, dwStereoPVAHandle_t obj)
 Get output disparity image properties. More...
 
DW_API_PUBLIC dwStatus dwStereoPVA_initialize (dwStereoPVAHandle_t *obj, uint32_t width, uint32_t height, const dwStereoPVAParams *stereoParams, dwContextHandle_t ctx)
 Initializes the stereo algorithm with the parameters. More...
 
DW_API_PUBLIC dwStatus dwStereoPVA_initParams (dwStereoPVAParams *stereoParams)
 Initializes the StereoPVA parameters. More...
 
DW_API_PUBLIC dwStatus dwStereoPVA_release (dwStereoPVAHandle_t obj)
 Releases the stereo algorithm. More...
 
DW_API_PUBLIC dwStatus dwStereoPVA_reset (dwStereoPVAHandle_t obj)
 Resets the Stereo module. More...
 
DW_API_PUBLIC dwStatus dwStereoPVA_setCUDAStream (cudaStream_t stream, dwStereoPVAHandle_t obj)
 Sets CUDA stream used by the stereo algorithm. More...
 

Data Structure Documentation

◆ dwStereoPVAParams

struct dwStereoPVAParams
Data Fields
dwStereoPVAMode estimationMode Estimation mode that determines the speed and quality of stereo algorithm.
dwProcessorType processorNVENC Specifies the processor type for the stages of the pipeline which run on NVENC.

Supported options are DW_PROCESSOR_TYPE_NVENC_0, DW_PROCESSOR_TYPE_NVENC_1

dwProcessorType processorPVA Specifies the processor type for the stages of the pipeline which run on PVA.

Supported options are DW_PROCESSOR_TYPE_PVA_0, DW_PROCESSOR_TYPE_PVA_1

Typedef Documentation

◆ dwStereoPVAHandle_t

typedef struct dwStereoPVAObject* dwStereoPVAHandle_t

A pointer to the handle representing a stereo algorithm on PVA.

This object allows the computation of a disparity map given two rectified stereo images

Definition at line 65 of file StereoPVA.h.

Enumeration Type Documentation

◆ dwStereoPVAMode

Stereo computation modes.

Enumerator
DW_STEREO_PVA_MODE_MEDIUM_QUALITY 

High performance with medium quality.

DW_STEREO_PVA_MODE_LOW_QUALITY 

Ultra high performance with lowest quality.

DW_STEREO_PVA_MODE_HIGH_QUALITY 

High quality with low performance.

Definition at line 70 of file StereoPVA.h.

Function Documentation

◆ dwStereoPVA_computeDisparity()

DW_API_PUBLIC dwStatus dwStereoPVA_computeDisparity ( dwImageHandle_t  disparityMap,
dwImageHandle_t  confidenceMap,
const dwImageHandle_t  leftImage,
const dwImageHandle_t  rightImage,
dwStereoPVAHandle_t  obj 
)

Executes the full pipeline and computes disparity map.

The pipeline runs on the following engines:

  • VIC (scaling & converting data)
  • PVA (hint generation)
  • NVENC (stereo disparity computation)
  • PVA (refining results)
  • GPU (copying memory back to GPU)
Parameters
[out]disparityMapDisparity map
[out]confidenceMapConfidence map
[in]leftImageLeft image. Expected YUV
[in]rightImageThe left 8 bit rectified image pyramid.
[in]objThe stereo algorithm handle.
Returns
DW_NVMEDIA_ERROR - if the underlying stereo algorithm had an internal error.
DW_INTERNAL_ERROR - if the underlying stereo algorithm had an internal error.
DW_INVALID_HANDLE - if given handle is not valid, i.e. null or of wrong type .
DW_SUCCESS

◆ dwStereoPVA_getConfidenceImageProperties()

DW_API_PUBLIC dwStatus dwStereoPVA_getConfidenceImageProperties ( dwImageProperties props,
dwStereoPVAHandle_t  obj 
)

Get output confidence image properties.

Parameters
[out]props
[in]obj
Returns
DW_INVALID_HANDLE if the given context handle is invalid,i.e. null or of wrong type
or DW_SUCCESS otherwise.

◆ dwStereoPVA_getCUDAStream()

DW_API_PUBLIC dwStatus dwStereoPVA_getCUDAStream ( cudaStream_t *  stream,
dwStereoPVAHandle_t  obj 
)

Gets CUDA stream used by the stereo algorithm.

Parameters
[out]streamThe CUDA stream currently used by the stereo algorithm.
[in]objThe stereo algorithm handle.
Returns
DW_INVALID_HANDLE if the given context handle is invalid, i.e. null or of wrong type
or DW_SUCCESS otherwise.

◆ dwStereoPVA_getDisparityImageProperties()

DW_API_PUBLIC dwStatus dwStereoPVA_getDisparityImageProperties ( dwImageProperties props,
dwStereoPVAHandle_t  obj 
)

Get output disparity image properties.

Parameters
[out]props
[in]obj
Returns
DW_INVALID_HANDLE if the given context handle is invalid,i.e. null or of wrong type
or DW_SUCCESS otherwise.

◆ dwStereoPVA_initialize()

DW_API_PUBLIC dwStatus dwStereoPVA_initialize ( dwStereoPVAHandle_t obj,
uint32_t  width,
uint32_t  height,
const dwStereoPVAParams stereoParams,
dwContextHandle_t  ctx 
)

Initializes the stereo algorithm with the parameters.

Parameters
[out]objA pointer to the stereo algorithm on PVA.
[in]widthThe width of one input image.
[in]heightThe height of one input image.
[in]stereoParamsA pointer to the configuration of the stereo algorithm.
[in]ctxthe handle to DW context.
Returns
DW_CUDA_ERROR - if the underlying stereo algorithm had a CUDA error.
DW_INVALID_HANDLE - if given handle is not valid, i.e. null or of wrong type .
DW_SUCCESS

◆ dwStereoPVA_initParams()

DW_API_PUBLIC dwStatus dwStereoPVA_initParams ( dwStereoPVAParams stereoParams)

Initializes the StereoPVA parameters.

Parameters
[out]stereoParamsParameters to be initialised with default values.
Returns
DW_INVALID_HANDLE - if given handle is not valid, i.e. null or of wrong type .
DW_SUCCESS

◆ dwStereoPVA_release()

DW_API_PUBLIC dwStatus dwStereoPVA_release ( dwStereoPVAHandle_t  obj)

Releases the stereo algorithm.

This method releases all resources associated with a stereo algorithm.

Note
This method renders the handle unusable.
Parameters
[in]objThe object handle to be released.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given context handle is invalid,i.e. null or of wrong type
DW_BAD_CAST

◆ dwStereoPVA_reset()

DW_API_PUBLIC dwStatus dwStereoPVA_reset ( dwStereoPVAHandle_t  obj)

Resets the Stereo module.

Parameters
[in]objSpecifies the stereo handle to reset.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given context handle is invalid,i.e. null or of wrong type
DW_BAD_CAST

◆ dwStereoPVA_setCUDAStream()

DW_API_PUBLIC dwStatus dwStereoPVA_setCUDAStream ( cudaStream_t  stream,
dwStereoPVAHandle_t  obj 
)

Sets CUDA stream used by the stereo algorithm.

Parameters
[in]streamThe CUDA stream.
[in]objThe stereo algorithm handle.
Returns
DW_INVALID_HANDLE if the given context handle is invalid,i.e. null or of wrong type
or DW_SUCCESS otherwise.