Merge energe.

This commit is contained in:
xinyang
2019-07-06 20:25:36 +08:00
parent 1abe8dec17
commit 0ffec961da
3 changed files with 4 additions and 7 deletions

View File

@@ -29,8 +29,8 @@ void ArmorFinder::run(cv::Mat &src) {
showArmorBox("box", src, armor_box, boxid);
cv::waitKey(1);
}
stateSearchingTarget(src_use);
return;
// stateSearchingTarget(src_use);
// return;
switch (state){
case SEARCHING_STATE:
if(stateSearchingTarget(src_use)){

View File

@@ -129,7 +129,6 @@ static bool findLightBlobs(const cv::Mat &src, LightBlobs &light_blobs) {
}else if(src.type() == CV_8UC1){
src_gray = src.clone();
}
LightBlobs all;
std::vector<std::vector<cv::Point> > light_contours;
cv::findContours(src_gray, light_contours, CV_RETR_LIST, CV_CHAIN_APPROX_NONE);
@@ -138,9 +137,7 @@ static bool findLightBlobs(const cv::Mat &src, LightBlobs &light_blobs) {
if(isValidLightBlob(src_gray, rect)){
light_blobs.emplace_back(rect);
}
all.emplace_back(rect);
}
showContours("all", src, all);
return light_blobs.size() >= 2;
}

View File

@@ -29,7 +29,7 @@ mcu_data mcuData = {
ARMOR_STATE,
0,
1,
ENEMY_RED,
ENEMY_BLUE,
};
WrapperHead *video_gimble = nullptr;