ChangeoverSwitchDectect.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. "off_on",
  17. "manual_electrokinetic",
  18. "open_zero_close",
  19. "manual_loca_remote",
  20. "remote_loacal",
  21. "light_open_close",
  22. "light_green_on",
  23. "light_green_off",
  24. "light_red_on",
  25. "light_red_off",
  26. "direct_ban_remote",
  27. "dispatch_substation",
  28. "background_dispatch",
  29. "open_normal_close",
  30. "local_remote",
  31. "handle_middle_top",
  32. "handle_right_top",
  33. "handle_left_top",
  34. "handle_left_bottom",
  35. "handle_right_bottom",
  36. "handle_middle_bottom",
  37. "handle_left",
  38. "handle_right",
  39. };
  40. const std::vector<std::string> classTypeName = {
  41. "off_on",
  42. "manual_electrokinetic",
  43. "open_zero_close",
  44. "manual_loca_remote",
  45. "remote_loacal",
  46. "light_open_close",
  47. "direct_ban_remote",
  48. "dispatch_substation",
  49. "background_dispatch",
  50. "open_normal_close",
  51. "local_remote",
  52. };
  53. const std::vector<std::string> classLightStateName = {
  54. "light_green_on",
  55. "light_green_off",
  56. "light_red_on",
  57. "light_red_off",
  58. };
  59. const std::vector<std::string> classLightTypeName = {
  60. "light_open_close",
  61. };
  62. };