LightDectect.h 525 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include "IDetection.h"
  3. class LightDectect :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. "red_off",
  15. "red_on",
  16. "green_off",
  17. "green_on",
  18. "yellow_off",
  19. "yellow_on",
  20. "off",
  21. "on"
  22. };
  23. };