CharacterDectect.h 752 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include "IDetection.h"
  3. class CharacterDectect :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> GetStateResults();
  9. vector < IDetection::DectectResult> GetDigitResults();
  10. bool Detect(cv::Mat& SrcImg);
  11. bool Init(bool isCuda);
  12. private:
  13. IDetection::DectectResult resultValue;
  14. vector <IDetection::DectectResult> resultStateValues;
  15. vector <IDetection::DectectResult> resultDigitValues;
  16. cv::dnn::Net net;
  17. const std::vector<std::string> className = {
  18. "on",
  19. "off",
  20. "stored_energy",
  21. "stored_energy_graphics",
  22. "green_on",
  23. "red_on"
  24. };
  25. };