This commit is contained in:
xinyang
2019-08-06 16:11:08 +08:00

View File

@@ -6,9 +6,10 @@
#include <show_images/show_images.h> #include <show_images/show_images.h>
#include <options.h> #include <options.h>
#include <opencv2/highgui.hpp> #include <opencv2/highgui.hpp>
#define DO_NOT_CNT_TIME
#include <log.h>
#define DO_NOT_CNT_TIME
#include <log.h>
static bool angelJudge(const LightBlob &light_blob_i, const LightBlob &light_blob_j) { static bool angelJudge(const LightBlob &light_blob_i, const LightBlob &light_blob_j) {
@@ -100,6 +101,7 @@ bool matchArmorBoxes(const cv::Mat &src, const LightBlobs &light_blobs, ArmorBox
if (min_x < 0 || max_x > src.cols || min_y < 0 || max_y > src.rows) { if (min_x < 0 || max_x > src.cols || min_y < 0 || max_y > src.rows) {
continue; continue;
} }
if ((max_y + min_y) / 2 < 120) continue;
if ((max_x - min_x) / (max_y - min_y) < 0.8) continue; if ((max_x - min_x) / (max_y - min_y) < 0.8) continue;
LightBlobs pair_blobs = {light_blobs.at(i), light_blobs.at(j)}; LightBlobs pair_blobs = {light_blobs.at(i), light_blobs.at(j)};
armor_boxes.emplace_back( armor_boxes.emplace_back(