Perception Tool Kit (PTK) API Guide
stereo_algo.h File Reference
Include dependency graph for stereo_algo.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PTK_Alg_StereoAlgo_configParams
 Stereo algorithm - config Parameters. More...
 
struct  PTK_Alg_StereoAlgo_roadParams
 Stereo algorithm - road Parameters. More...
 
struct  PTK_Alg_StereoAlgo_camParams
 Stereo algorithm - road Parameters. More...
 
struct  PTK_Alg_StereoAlgo_dispParams
 Stereo algorithm - disparity parameters. More...
 
struct  PTK_Alg_StereoAlgo_uvDispParams
 Stereo algorithm - uvDisparity parameters. More...
 
struct  PTK_Alg_StereoAlgo_obsProbParams
 Stereo algorithm - obstacle probability (per pixel) parameters. More...
 
struct  PTK_Alg_StereoAlgo_bottomObsParams
 Stereo algorithm - bottom of obstacle parameter. More...
 
struct  PTK_Alg_StereoAlgo_groundParams
 Stereo algorithm - ground plane parameters. More...
 
struct  PTK_Alg_StereoAlgo_groundModelHistory
 Stereo algorithm - V-disparity ground plane model histroy. More...
 
struct  PTK_Alg_StereoAlgo_groundModelHistory_Array
 Stereo algorithm - V-disparity ground plane model histroy array for muliple models. More...
 
struct  PTK_Alg_StereoAlgo_groundModelParams
 Stereo algorithm - V-disparity ground plane model. More...
 
struct  PTK_Alg_StereoAlgo_groundModelParams_Array
 Stereo algorithm - V-disparity ground plane model array for multiple models. More...
 
struct  PTK_Alg_StereoAlgo_obstacleDetetionMems
 Stereo algorithm - Data mems needed for algorithms. More...
 

Macros

#define AUX_CODE_REMOVE   0
 
#define TEST_MAX_FILE_PATH   (256u)
 
#define MAX_FRAME_WIDTH   (1920u)
 
#define MAX_FRAME_HEIGHT   (1080u)
 
#define ALGORITHM_PROCESS_OK   0
 
#define ALGORITHM_PROCESS_FAIL   -1
 
#define PI   3.14159265358979f
 
#define MMAX(a, b)   ((a > b) ? (a) : (b))
 
#define MMIN(a, b)   ((a < b) ? (a) : (b))
 
#define NUM_GP_MODELS   1
 
#define NUM_FRAC_BITS   4
 

Functions

int32_t PTK_Alg_StereoAlgo_computeObstacleProbalilityPerPixel (PTK_Alg_StereoAlgo_obsProbParams *copppParams, PTK_Alg_StereoAlgo_camParams *camParams, PTK_Alg_StereoAlgo_groundModelParams_Array *gmParamsArr, PTK_Alg_StereoAlgo_obstacleDetetionMems *algoMemData)
 Compute probabilities of pixels to be obstacle configuration parameters. More...
 
void PTK_Alg_StereoAlgo_computeObstacleProbabilityPerPixel_verticalLoop (PTK_Alg_StereoAlgo_obsProbParams *copppParams, PTK_Alg_StereoAlgo_camParams *camParams, PTK_Alg_StereoAlgo_groundModelParams_Array *gmParamsArr, PTK_Alg_StereoAlgo_obstacleDetetionMems *algoMemData, int32_t horizon)
 Compute probabilities of pixels to be obstacle configuration parameters. More...
 
void PTK_Alg_StereoAlgo_findBottomOfObstacle (PTK_Alg_StereoAlgo_obsProbParams *copppParams, PTK_Alg_StereoAlgo_bottomObsParams *fbooParams, PTK_Alg_StereoAlgo_obstacleDetetionMems *algoMemData)
 Find the closest y positions where obstacles are on every column of an image. More...
 
void PTK_Alg_StereoAlgo_downsampleDisparity (PTK_Alg_StereoAlgo_configParams *config, PTK_Alg_StereoAlgo_obsProbParams *copppParams, int16_t *disparity, float *dsDisparity)
 Downsample input disparity map. More...
 
void PTK_Alg_StereoAlgo_filterLowConfDisparity (int32_t width, int32_t height, int8_t existConf, int8_t threshold, int16_t *disparity, int16_t *outDisparity)
 Filter out low-confidence disparities. More...
 
float PTK_Alg_StereoAlgo_getDisparityFromModel (PTK_Alg_StereoAlgo_groundModelParams *gmParams, float x, float y)
 Get disparity for input position (X, y) from a ground plane model. More...
 
int32_t PTK_Alg_StereoAlgo_findYforDisparity (PTK_Alg_StereoAlgo_groundModelParams *gmParams, PTK_Alg_StereoAlgo_camParams *camParams, int32_t x, float disparity)
 Get y position of a pixel for the given horizontal position and disparity. More...
 
float PTK_Alg_StereoAlgo_disparity2Depth (PTK_Alg_StereoAlgo_camParams *camParams, float disparity, float ypos)
 Convert disparity to depth. More...
 
int32_t PTK_Alg_StereoAlgo_randRange (int32_t min, int32_t max)
 Generate random number between two numbers. More...
 
void PTK_Alg_StereoAlgo_transpose (float *M, int32_t M_width, int32_t M_height, float *Mt)
 Generate random number between two numbers. More...
 
void PTK_Alg_StereoAlgo_multiplyMatrix (float *iM1, int32_t iM1_width, int32_t iM1_height, float *iM2, int32_t iM2_width, int32_t iM2_height, float *oM, int32_t oM_width, int32_t oM_height)
 Multiply two matrices. More...
 
int32_t PTK_Alg_StereoAlgo_LUdecomposition (float *A, int32_t A_width, int32_t A_height, float *b, int32_t b_width, int32_t n_toCompute)
 LU decomposition. More...
 

Macro Definition Documentation

◆ AUX_CODE_REMOVE

#define AUX_CODE_REMOVE   0

◆ TEST_MAX_FILE_PATH

#define TEST_MAX_FILE_PATH   (256u)

◆ MAX_FRAME_WIDTH

#define MAX_FRAME_WIDTH   (1920u)

◆ MAX_FRAME_HEIGHT

#define MAX_FRAME_HEIGHT   (1080u)

◆ ALGORITHM_PROCESS_OK

#define ALGORITHM_PROCESS_OK   0

◆ ALGORITHM_PROCESS_FAIL

#define ALGORITHM_PROCESS_FAIL   -1

◆ PI

#define PI   3.14159265358979f

◆ MMAX

#define MMAX (   a,
 
)    ((a > b) ? (a) : (b))

◆ MMIN

#define MMIN (   a,
 
)    ((a < b) ? (a) : (b))

◆ NUM_GP_MODELS

#define NUM_GP_MODELS   1

The number of ground plane model for a frame. 1: A whole image uses the same ground plane model 2: Left half and right half of image has a separte model.

◆ NUM_FRAC_BITS

#define NUM_FRAC_BITS   4