Perception Tool Kit (PTK) API Guide
PTK Stereo Disparity Merge Postprocess

Introduction

Data Structures

struct  PTK_Alg_StereoPP_DisparityMerge_configParams
 Stereo Post-Processing Disparity Merge algorithm - config Parameters. More...
 
struct  PTK_Alg_StereoPP_DisparityMergeObj
 Stereo algorithm - 1-D hole filling context. More...
 

Functions

void PTK_Alg_StereoPP_DisparityMergeSetParams (PTK_Alg_StereoPP_DisparityMerge_configParams *cfg, PTK_Alg_StereoPP_DisparityMergeObj *cntxt)
 Initialize disparity merge parameters. More...
 
int32_t PTK_Alg_StereoPP_DisparityMergeConfig (PTK_Alg_StereoPP_DisparityMerge_configParams *cfg, PTK_Api_MemoryReq *memReq)
 Computes the memory requirements based on the given algorithm configuration parameters. More...
 
PTK_AlgHandle PTK_Alg_StereoPP_DisparityMergeInit (PTK_Alg_StereoPP_DisparityMerge_configParams *cfg, const PTK_Api_MemoryRsp *memRsp)
 Initializes the library based on the given algorithm configuration parameters and allocated memory blocks. More...
 
int32_t PTK_Alg_StereoPP_DisparityMergeGetMem (PTK_Alg_StereoPP_DisparityMergeObj *cntxt, uint8_t *memPtr)
 Get memory size. More...
 
void PTK_Alg_StereoPP_mergeDisparity (PTK_Alg_StereoPP_DisparityMergeObj *cntxt, int16_t *disparityLowBuffer, int16_t *disparityHighBuffer, int16_t *outDisparityBuffer, int16_t lowBufferStride, int16_t highBufferStride)
 Merge two disparity maps. More...
 
void PTK_Alg_StereoPP_upsampleDisparity (int16_t *lowDisparity, int16_t *upDisparity, int16_t loWidth, int16_t loStride, int16_t loHeight, int16_t hiWidth, int16_t hiStride, int16_t hiHeight, int8_t loDispOnlyFlag)
 Upsample low-resolution disparity. More...
 

Function Documentation

◆ PTK_Alg_StereoPP_DisparityMergeSetParams()

void PTK_Alg_StereoPP_DisparityMergeSetParams ( PTK_Alg_StereoPP_DisparityMerge_configParams cfg,
PTK_Alg_StereoPP_DisparityMergeObj cntxt 
)

Initialize disparity merge parameters.

Parameters
[in]cfgconfiguration parameters for disparity merge
[in]cntxthole filling algorithm context
Returns

◆ PTK_Alg_StereoPP_DisparityMergeConfig()

int32_t PTK_Alg_StereoPP_DisparityMergeConfig ( PTK_Alg_StereoPP_DisparityMerge_configParams cfg,
PTK_Api_MemoryReq memReq 
)

Computes the memory requirements based on the given algorithm configuration parameters.

Parameters
[in]cntxtAlgorithm configuration parameters.
[in]memReqMemory requirements as specified below
  • entry [0]: Memory for internal context. Best allocated from the fastest memory.
  • entry [1]: Memory for internal point cloud. Best allocated from the fastest memory.
  • entry [2]: Memory for the output buffer. The output buffer is allocated by the Application so this entry is just to communicate the output buffer size. No need to pass the memory to the library in the init call PTK_Alg_SfmOgmapInit().
Returns
  • PTK_ALG_RET_SUCCESS, if successful
  • < error code, otherwise

◆ PTK_Alg_StereoPP_DisparityMergeInit()

PTK_AlgHandle PTK_Alg_StereoPP_DisparityMergeInit ( PTK_Alg_StereoPP_DisparityMerge_configParams cfg,
const PTK_Api_MemoryRsp memRsp 
)

Initializes the library based on the given algorithm configuration parameters and allocated memory blocks.

Parameters
[in]allParamsAlgorithm configuration parameters.
[in]memRspMemory blocks as specified below
Returns
  • valid handle, if successful
  • NULL, otherwise

◆ PTK_Alg_StereoPP_DisparityMergeGetMem()

int32_t PTK_Alg_StereoPP_DisparityMergeGetMem ( PTK_Alg_StereoPP_DisparityMergeObj cntxt,
uint8_t *  memPtr 
)

Get memory size.

Parameters
[in,out]cntxtAlgorithm handle.
[in]memoryblock pointer
Returns
  • required memory size

◆ PTK_Alg_StereoPP_mergeDisparity()

void PTK_Alg_StereoPP_mergeDisparity ( PTK_Alg_StereoPP_DisparityMergeObj cntxt,
int16_t *  disparityLowBuffer,
int16_t *  disparityHighBuffer,
int16_t *  outDisparityBuffer,
int16_t  lowBufferStride,
int16_t  highBufferStride 
)

Merge two disparity maps.

Parameters
[in]cntxtalgorithm handle
[in]disparityLowBufferinput lower-resolution disparity buffer
[in]disparityHighBufferinput higher-resolution disparity buffer
[out]outDisparityBufferoutput disparity buffer
[in]lowBufferStridestride of lower-resolution disparity buffer
[in]highBufferStridestride of higher-resolution disparity buffer
Returns

◆ PTK_Alg_StereoPP_upsampleDisparity()

void PTK_Alg_StereoPP_upsampleDisparity ( int16_t *  lowDisparity,
int16_t *  upDisparity,
int16_t  loWidth,
int16_t  loStride,
int16_t  loHeight,
int16_t  hiWidth,
int16_t  hiStride,
int16_t  hiHeight,
int8_t  loDispOnlyFlag 
)

Upsample low-resolution disparity.

Parameters
[in]lowDisparitylow-disparity disparity map
[out]upDisparityupsampled disparity map
[in]loWidthlow-resolution disparity width
[in]loStridelow-resolution disparity stride
[in]loHeightlow-resolution disparity height
[in]hiWidthupsampled disparity width
[in]hiStrideupsampled disparity stride
[in]hiHeightupsampled disparity height
Returns