12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #pragma once
- #include "IDetection.h"
- class ChangeoverSwitchDectect :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<std::string> className = {
- "on",
- "off",
- "manual_electrokinetic",
- "open_zero_close",
- "manual_loca_remote",
- "remote_loacal",
- "light_open_close",
- "light_green_on",
- "light_green_off",
- "light_red_on",
- "light_red_off",
- "direct_ban_remote",
- "dispatch_substation",
- "background_dispatch",
- "open_normal_close",
- "local_remote",
- "handle_middle_top",
- "handle_right_top",
- "handle_left_top",
- "handle_left_bottom",
- "handle_right_bottom",
- "handle_middle_bottom",
- "handle_left",
- "handle_right",
- };
- const std::vector<std::string> classTypeName = {
- "manual_electrokinetic",
- "open_zero_close",
- "manual_loca_remote",
- "remote_loacal",
- "light_open_close",
- "direct_ban_remote",
- "dispatch_substation",
- "background_dispatch",
- "open_normal_close",
- "local_remote",
- };
- const std::vector<std::string> classLightStateName = {
- "light_green_on",
- "light_green_off",
- "light_red_on",
- "light_red_off",
- };
- const std::vector<std::string> classLightTypeName = {
- "light_open_close",
-
- };
- };
|