摄像头测试代码
在main.c文件中img_processing();函数里pts_left和pts_right两个数组储存边线坐标
This commit is contained in:
35
app/gl_common.h
Normal file
35
app/gl_common.h
Normal 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_ */
|
||||
Reference in New Issue
Block a user