摄像头测试代码
在main.c文件中img_processing();函数里pts_left和pts_right两个数组储存边线坐标
This commit is contained in:
23
app/gl_garage.c
Normal file
23
app/gl_garage.c
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "zf_common_headfile.h"
|
||||
#include "math.h"
|
||||
#include "gl_headfile.h"
|
||||
|
||||
enum garage_type_e garage_type = GARAGE_NONE;
|
||||
|
||||
float (*garage_rpts)[2];
|
||||
int garage_rpts_num;
|
||||
|
||||
float calculate_vector_angle(float x1, float y1, float x2, float y2) {
|
||||
float dx = x2 - x1;
|
||||
float dy = y2 - y1;
|
||||
|
||||
float vector_length = sqrt(dx*dx + dy*dy);
|
||||
float angle_radians = acos(dx / vector_length);
|
||||
float angle_degrees = angle_radians * 180 / M_PI;
|
||||
|
||||
return angle_degrees;
|
||||
}
|
||||
|
||||
void CheckGarage() {}
|
||||
|
||||
void RunGarage(){}
|
||||
Reference in New Issue
Block a user