摄像头测试代码

在main.c文件中img_processing();函数里pts_left和pts_right两个数组储存边线坐标
This commit is contained in:
Glz
2023-12-17 16:11:35 +08:00
parent eaa7cc0eea
commit ce31d900ee
23 changed files with 1261 additions and 45 deletions

35
app/gl_common.h Normal file
View File

@@ -0,0 +1,35 @@
#ifndef COMMON_H_
#define COMMON_H_
#define IMAGE_H (MT9V03X_H)
#define IMAGE_W (MT9V03X_W)
#define BEGINH_L (61)
#define BEGINH_R (61)
#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_ */