现可使用CNN分类器判断装甲板及其数字。

This commit is contained in:
xinyang
2019-04-20 14:30:57 +08:00
parent f891f1da34
commit 83e9a0daf9
5 changed files with 152 additions and 135 deletions

View File

@@ -8,6 +8,7 @@
#include <opencv2/core.hpp>
#include <opencv2/tracking.hpp>
#include <uart/uart.h>
#include <armor_finder/classifier/classifier.h>
typedef enum{
ENEMY_BLUE, ENEMY_RED
@@ -15,7 +16,7 @@ typedef enum{
class ArmorFinder{
public:
ArmorFinder(EnemyColor color, Uart &u);
ArmorFinder(EnemyColor color, Uart &u, string paras_folder);
~ArmorFinder() = default;
private:
@@ -29,6 +30,9 @@ private:
State state;
cv::Rect2d armor_box;
cv::Ptr<cv::Tracker> tracker;
cv::Mat src_gray;
Classifier classifier;
int contour_area;
Uart &uart;