ChangeoverSwitchDectect.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #pragma once
  2. #include "IDetection.h"
  3. class ChangeoverSwitchDectect :IDetection
  4. {
  5. public:
  6. IDetection::DectectResult GetStateResult(cv::Mat img, cv::Rect rec);
  7. IDetection::DectectResult GetDigitResult(cv::Mat img, cv::Rect rec);
  8. bool Detect(cv::Mat& SrcImg);
  9. bool Init(bool isCuda);
  10. private:
  11. IDetection::DectectResult resultValue;
  12. cv::dnn::Net net;
  13. const std::vector<std::string> className = {
  14. "on",
  15. "off",
  16. "manual_electrokinetic",
  17. "open_zero_close",
  18. "manual_loca_remote",
  19. "remote_loacal",
  20. "light_open_close",
  21. "light_green_on",
  22. "light_green_off",
  23. "light_red_on",
  24. "light_red_off",
  25. "direct_ban_remote",
  26. "dispatch_substation",
  27. "background_dispatch",
  28. "open_normal_close",
  29. "local_remote",
  30. "handle_middle_top",
  31. "handle_right_top",
  32. "handle_left_top",
  33. "handle_left_bottom",
  34. "handle_right_bottom",
  35. "handle_middle_bottom",
  36. "handle_left",
  37. "handle_right",
  38. };
  39. const std::vector<std::string> classTypeName = {
  40. "manual_electrokinetic",
  41. "open_zero_close",
  42. "manual_loca_remote",
  43. "remote_loacal",
  44. "light_open_close",
  45. "direct_ban_remote",
  46. "dispatch_substation",
  47. "background_dispatch",
  48. "open_normal_close",
  49. "local_remote",
  50. };
  51. const std::vector<std::string> classLightStateName = {
  52. "light_green_on",
  53. "light_green_off",
  54. "light_red_on",
  55. "light_red_off",
  56. };
  57. const std::vector<std::string> classLightTypeName = {
  58. "light_open_close",
  59. };
  60. };