// // Created by UnknownObject on 2022/9/21. // Copyright (c) 2022 UnknownNetworkService. All rights reserved. // #ifndef MAINCAR_TRAFFIC_LIGHT_H #define MAINCAR_TRAFFIC_LIGHT_H //交通灯识别 #include #include #include #include #include "public_types.h" #include "opencv_support.h" #include "debug_logger.h" #include #define TRAFFIC_LIGHT_RECO_VERSION "1.0.0" namespace uns { class TrafficLight { private: int tri_max(int a, int b, int c); cv::Mat GetLight(const cv::Mat &img); cv::Rect GetMaxRect(const cv::Mat &img); bool MuchLarger(int a, int b, double rate); Light::TL_COLOR GetImageColor(const cv::Mat &img, double rate); public: Light::TL_COLOR Reco(cv::Mat &img); }; }; #endif //MAINCAR_TRAFFIC_LIGHT_H