Perception Tool Kit (PTK) API Guide
PTK Stereo PC creation process

Introduction

Data Structures

struct  PTK_Alg_StereoOG_CreatePCConfigParams
 Stereo PC creation process - config Parameters. More...
 
struct  PTK_Alg_StereoOG_CreatePCCamParams
 Stereo PC creation process - camera Parameters. More...
 
struct  PTK_Alg_StereoOG_CreatePCAllParams
 Stereo PC creation process - All algorithm parameters. More...
 
struct  PTK_Alg_StereoOG_CreatePCObj
 Stereo PC creation process - PC creation context. More...
 

Functions

void PTK_Alg_StereoOG_CreatePCSetParams (PTK_Alg_StereoOG_CreatePCAllParams *params, PTK_Alg_StereoOG_CreatePCObj *cntxt)
 Initialize PC creation parameters. More...
 
int32_t PTK_Alg_StereoOG_CreatePCConfig (PTK_Alg_StereoOG_CreatePCAllParams *params, PTK_Api_MemoryReq *memReq)
 Computes the memory requirements based on the given algorithm configuration parameters. More...
 
PTK_AlgHandle PTK_Alg_StereoOG_CreatePCInit (PTK_Alg_StereoOG_CreatePCAllParams *params, const PTK_Api_MemoryRsp *memRsp)
 Initializes the library based on the given algorithm configuration parameters and allocated memory blocks. More...
 
int32_t PTK_Alg_StereoOG_CreatePCGetMem (PTK_Alg_StereoOG_CreatePCObj *cntxt, uint8_t *memPtr)
 Get memory size. More...
 
void PTK_Alg_StereoOG_createPC (PTK_Alg_StereoOG_CreatePCObj *cntxt, int16_t *disparity, uint8_t *ssmap, PTK_PointCloud *pc)
 Root function to creaet point clouds from disparity map and semantic segmantation map. More...
 
void PTK_Alg_StereoOG_downsampleDisparity (PTK_Alg_StereoOG_CreatePCConfigParams *config, int16_t *disparity, float *dsDisparity)
 Downsample input disparity map. More...
 
void PTK_Alg_StereoOG_downsampleSSMap (PTK_Alg_StereoOG_CreatePCConfigParams *config, uint8_t *ssmap, uint8_t *dsSSMap)
 Downsample input semantic segmentation map. More...
 
int32_t PTK_Alg_StereoOG_triangulate (PTK_Alg_StereoOG_CreatePCAllParams *params, float *dsDisparity, uint8_t *dsSSMap, PTK_PointCloud *pc)
 Triangulate points using downsampled disparity and semantic segmentation to create point cloud. More...
 
int8_t PTK_Alg_StereoOG_classToPC (uint8_t classId)
 Check if the point with a particular class should be triangulated. More...
 
int8_t PTK_Alg_StereoOG_classToDetect (uint8_t classId)
 Check if a particular class of object should be detected. More...
 

Function Documentation

◆ PTK_Alg_StereoOG_CreatePCSetParams()

void PTK_Alg_StereoOG_CreatePCSetParams ( PTK_Alg_StereoOG_CreatePCAllParams params,
PTK_Alg_StereoOG_CreatePCObj cntxt 
)

Initialize PC creation parameters.

Parameters
[in]paramsall algorithm parameters for PC creation
[in]cntxtPC creation algorithm context

◆ PTK_Alg_StereoOG_CreatePCConfig()

int32_t PTK_Alg_StereoOG_CreatePCConfig ( PTK_Alg_StereoOG_CreatePCAllParams params,
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_StereoOG_CreatePCInit()

PTK_AlgHandle PTK_Alg_StereoOG_CreatePCInit ( PTK_Alg_StereoOG_CreatePCAllParams params,
const PTK_Api_MemoryRsp memRsp 
)

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

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

◆ PTK_Alg_StereoOG_CreatePCGetMem()

int32_t PTK_Alg_StereoOG_CreatePCGetMem ( PTK_Alg_StereoOG_CreatePCObj cntxt,
uint8_t *  memPtr 
)

Get memory size.

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

◆ PTK_Alg_StereoOG_createPC()

void PTK_Alg_StereoOG_createPC ( PTK_Alg_StereoOG_CreatePCObj cntxt,
int16_t *  disparity,
uint8_t *  ssmap,
PTK_PointCloud pc 
)

Root function to creaet point clouds from disparity map and semantic segmantation map.

Parameters
[in]cntxtalgorithm handle
[in]disparitydisparity buffer
[in]ssmapsemantic segmentaion buffer
[out]pcPoint cloud

◆ PTK_Alg_StereoOG_downsampleDisparity()

void PTK_Alg_StereoOG_downsampleDisparity ( PTK_Alg_StereoOG_CreatePCConfigParams config,
int16_t *  disparity,
float *  dsDisparity 
)

Downsample input disparity map.

Parameters
[in]configalgorihtm configuration params
[in]disparityinput disparity map
[out]dsDisparitydownsampled disparity map

◆ PTK_Alg_StereoOG_downsampleSSMap()

void PTK_Alg_StereoOG_downsampleSSMap ( PTK_Alg_StereoOG_CreatePCConfigParams config,
uint8_t *  ssmap,
uint8_t *  dsSSMap 
)

Downsample input semantic segmentation map.

Parameters
[in]configalgorihtm configuration params
[in]ssmapinput semantic segmentation map
[out]dsSSMapdownsampled semantic segmentation map

◆ PTK_Alg_StereoOG_triangulate()

int32_t PTK_Alg_StereoOG_triangulate ( PTK_Alg_StereoOG_CreatePCAllParams params,
float *  dsDisparity,
uint8_t *  dsSSMap,
PTK_PointCloud pc 
)

Triangulate points using downsampled disparity and semantic segmentation to create point cloud.

Parameters
[in]paramsAll algorihtm configuration params
[in]dsDisparityDown-sampled disparity map
[out]dsSSMapdownsampled semantic segmentation map

◆ PTK_Alg_StereoOG_classToPC()

int8_t PTK_Alg_StereoOG_classToPC ( uint8_t  classId)

Check if the point with a particular class should be triangulated.

Parameters
[in]classIdclass id of a point
Returns
1 if a point should be triangualted

◆ PTK_Alg_StereoOG_classToDetect()

int8_t PTK_Alg_StereoOG_classToDetect ( uint8_t  classId)

Check if a particular class of object should be detected.

Parameters
[in]classIdclass id
Returns
1 if a input class id one that should be detected