添加单目估距。

This commit is contained in:
xinyang
2019-07-10 13:09:42 +08:00
parent 5c6d96425b
commit 747fb58eb8
12 changed files with 12554 additions and 12542 deletions

View File

@@ -1,11 +1,11 @@
/*******************************************************************/
/* ____ _ _____ _ _ ____ __ __ ______ __ */
/*/ ___| | |_ _| | | | | _ \| \/ | / ___\ \ / / */
/*\___ \ _ | | | | | | | |_____| |_) | |\/| |_____| | \ \ / / */
/* ___) | |_| | | | | |_| |_____| _ <| | | |_____| |___ \ V / */
/*|____/ \___/ |_| \___/ |_| \_\_| |_| \____| \_/ */
/* */
/*******************************************************************/
/**********************************************************************/
/* ____ _ _____ _ _ ____ __ __ ______ __ */
/* / ___| | |_ _| | | | | _ \| \/ | / ___\ \ / / */
/* \___ \ _ | | | | | | | |_____| |_) | |\/| |_____| | \ \ / / */
/* ___) | |_| | | | | |_| |_____| _ <| | | |_____| |___ \ V / */
/* |____/ \___/ |_| \___/ |_| \_\_| |_| \____| \_/ */
/* */
/**********************************************************************/
#include <iostream>
#include <thread>
@@ -27,7 +27,7 @@ using namespace std;
mcu_data mcuData = { // 单片机端回传结构体
0, // 当前云台yaw角
0, // 当前云台pitch角
SMALL_ENERGY_STATE, // 当前状态,自瞄-大符-小符
ARMOR_STATE, // 当前状态,自瞄-大符-小符
0, // 云台角度标记位
1, // 是否启用数字识别
ENEMY_RED, // 敌方颜色
@@ -43,6 +43,8 @@ ArmorFinder armorFinder(mcuData.enemy_color, serial, PROJECT_DIR"/tools/para/",
// 能量机关主程序对象
Energy energy(serial, mcuData.enemy_color);
int box_distance = 0;
int main(int argc, char *argv[]) {
process_options(argc, argv); // 处理命令行参数
thread receive(uartReceive, &serial); // 开启串口接收线程
@@ -120,7 +122,6 @@ int main(int argc, char *argv[]) {
energy.runBig(gimble_src);
}
}
// cv::waitKey(3);
});
} while (ok);
delete video_gimble;