2023-12-17 16:11:35 +08:00
|
|
|
#ifndef COMMON_H_
|
|
|
|
|
#define COMMON_H_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define IMAGE_H (MT9V03X_H)
|
|
|
|
|
#define IMAGE_W (MT9V03X_W)
|
2023-12-24 22:24:21 +08:00
|
|
|
#define BEGINH_L (80)
|
|
|
|
|
#define BEGINH_R (80)
|
2023-12-17 16:11:35 +08:00
|
|
|
#define BEGINW_L (-18)
|
|
|
|
|
#define BEGINW_R (-12)
|
|
|
|
|
#define PT_MAXLEN (75)
|
|
|
|
|
#define GET_PIX_1C(IMG, H, W) (IMG[(H) * MT9V03X_W + (W)]) //获取像素点的值
|
|
|
|
|
#define FIX_BINTHRESHOLD (140) //设置最开始的阈值
|
|
|
|
|
#define SELFADAPT_KERNELSIZE (7) //巡线区域核大小
|
|
|
|
|
#define FILTER_KERNELSIZE (7) //滤波核大小
|
|
|
|
|
#define SELFADAPT_OFFSET (8) //适应性块大小
|
|
|
|
|
#define PIXPERMETER (56)
|
|
|
|
|
#define RESAMPLEDIST (0.02)
|
|
|
|
|
#define ANGLEDIST (0.2)
|
|
|
|
|
#define ROADWIDTH (0.45)
|
|
|
|
|
#define FRAMENONE (1)
|
|
|
|
|
#define FRAMETOLEFT (5)
|
|
|
|
|
#define FRAMETORIGHT (5)
|
|
|
|
|
|
|
|
|
|
typedef signed int sint32;
|
|
|
|
|
typedef float float32;
|
|
|
|
|
|
|
|
|
|
sint32 limit(sint32 x, sint32 low, sint32 up);
|
|
|
|
|
int clip(int x, int low, int up);
|
|
|
|
|
float fclip(float x, float low, float up) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* COMMON_H_ */
|