2021Robomaster能量机关识别算法
未完待续
2021/6/17
文章目录
前言
VS2019+opencv420+win10
一、代码目录
- addtion.h 定义结构体,便于传输数据
- CameraApi.h 相机Api头文件
- Constant.h 定义一些常量
- constants.h 宏定义
- energy.h energy类
- param_struct_define.h 能量机关参数结构体
- stdafx.h
- targetver.h
- clear.cpp 容器清理,图片预处理
- energy.cpp energy类的构造函数与析构函数
- energy_finder.cpp 寻找扇叶,装甲板,R等
- energy_init.cpp 参数初始化
- get_aim_point.cpp
- get_polar_angle.cpp 获取极坐标 大小符判断
- get_predict_point.cpp 获取预测点坐标
- judge_contour.cpp 判断函数集
- OpenCV.cpp 函数入口
- run.cpp 程序执行流程
- send.cpp 发送数据程序
- show.cpp 显示函数集
- split.cpp 通道分离函数集
- structing.cpp 膨胀腐蚀不同内核
- target_change.cpp 目标切换
- target_finder.cpp 寻找装甲板
- tool.cpp 各类工具集
二、核心代码解释
OpenCV.cpp
if (flag % 5 == 0)
{
//用来计算当前时间到需要时间的每帧平均运行时间
flag = 0;
float tempSum = 0, avg = 0;
if (times