ElectronPlateDectect.h 840 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "IDetection.h"
  3. class ElectronPlateDectect :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. "three_rows_digit_voltage",
  18. "three_rows_digit_current",
  19. "two_rows_digit_voltage_current",
  20. "one_rows_digit_temperature",
  21. "one_rows_digit_count",
  22. "one_rows_digit_voltage",
  23. "one_rows_digit_current",
  24. };*/
  25. const std::vector<std::string> className = { "digit","state" };
  26. };