#pragma once #include "IDetection.h" class LightDectect :IDetection { public: IDetection::DectectResult GetStateResult(cv::Mat img, cv::Rect rec); IDetection::DectectResult GetDigitResult(cv::Mat img, cv::Rect rec); bool Detect(cv::Mat& SrcImg); bool Init(bool isCuda); private: IDetection::DectectResult resultValue; cv::dnn::Net net; const std::vector className = { "red_off", "red_on", "green_off", "green_on", "yellow_off", "yellow_on", "off", "on" }; };