MeterDectect.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #include "IDetection.h"
  3. class MeterDectect :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. vector<IDetection::DectectResult> GetDigitResults(cv::Mat img, cv::Rect rec);
  9. bool Detect(cv::Mat& SrcImg);
  10. bool Init(bool isCuda);
  11. private:
  12. IDetection::DectectResult resultValue;
  13. vector<IDetection::DectectResult> resultValues;
  14. vector<Output> output;
  15. cv::dnn::Net net;
  16. /*const std::vector<std::string> className = {
  17. "circular_arrester_current",
  18. "atmospheric_pressure",
  19. "digital_gear",
  20. "rect_arrester_current",
  21. "quarter_square_ammeter",
  22. "double_pointer_count",
  23. "transformers_oil_surface_thermometer",
  24. "close",
  25. "open",
  26. "round_single_point_oil_level",
  27. "oil_thermometer",
  28. "old_oil_thermometer",
  29. };*/
  30. const vector<std::string> className = {
  31. "atmospheric_pressure",
  32. "ampere_meter",
  33. "transformers_oil_surface_thermometer",
  34. "rect_arrester_current",
  35. "double_pointer_count",
  36. "round_single_point_oil_level",
  37. "voltage_meter",
  38. "oil_thermometer"};
  39. };