// // Created by UnknownObject on 2022/10/7. // Copyright (c) 2022 UnknownNetworkService. All rights reserved. // #ifndef MAINCAR_TRAFFIC_SIGN_H #define MAINCAR_TRAFFIC_SIGN_H //交通标志识别 #define TRAFFIC_SIGN_RECO_VERSION "1.0.0" #include #include #include #include "image_processor.h" #include "opencv_support.h" #include #include #include namespace uns { class TrafficSign { private: std::string external_image_storage = ""; std::string img_str[6] = { "tf-0.jpg", "tf-1.jpg", "tf-2.jpg", "tf-3.jpg", "tf-4.jpg", "tf-5.jpg" }; private: int PixCount(cv::Mat image); bool GetImageROI(const cv::Mat& src, cv::Mat& roi_image); bool Read_Data(std::string filename, std::vector& dataset); int SignRecognition(const cv::Mat& roi_image, const std::vector& dataset); public: void SetExternalImagePath(std::string path); int RecognitionSign(const cv::Mat& source); }; }; #endif //MAINCAR_TRAFFIC_SIGN_H