This commit is contained in:
JiatongSun
2019-04-15 19:21:58 +08:00
parent 2e03e80653
commit be4df07199

View File

@@ -8,7 +8,7 @@ using std::cout;
using std::endl;
using std::vector;
extern float mark_yaw, mark_pitch;
extern float curr_yaw, curr_pitch, mark_yaw, mark_pitch;
extern int mark;
int Energy::run(cv::Mat &src){
@@ -31,11 +31,11 @@ int Energy::run(cv::Mat &src){
// imshow("bin",src);
fans_cnt = findFan(src, fans, last_fans_cnt);
// fans_cnt = findFan(src, fans, last_fans_cnt);
// cout<<"fans_cnt: "<<fans_cnt<<endl;
if(fans_cnt==-1) return 0;//滤去漏判的帧
// if(fans_cnt==-1) return 0;//滤去漏判的帧
// if(fans_cnt>0)showFanContours("fan",src,fans);
// fans_cnt=0;
fans_cnt=0;
armors_cnt = findArmor(src, armors, last_armors_cnt);
// cout<<"armors_cnt: "<<armors_cnt<<endl;
@@ -78,12 +78,11 @@ int Energy::run(cv::Mat &src){
sendTargetByUart(yaw_rotation, pitch_rotation, attack_distance);
cout<<"yaw: "<<yaw_rotation<<'\t'<<"pitch: "<<pitch_rotation<<endl;
cout<<"curr_yaw: "<<curr_yaw<<'\t'<<"curr_pitch: "<<curr_pitch<<endl;
cout<<"mark_yaw: "<<mark_yaw<<'\t'<<"mark_pitch: "<<mark_pitch<<endl;
cout<<"send_cnt: "<<send_cnt<<endl;
}