JdydAlgorithnm.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #pragma once
  2. #include <nlohmann/json.hpp>
  3. #include <string>
  4. #include<iostream>
  5. #include<opencv2/opencv.hpp>
  6. #include <opencv2/highgui/highgui_c.h>
  7. #include <iostream>
  8. #include <vector>
  9. #include <algorithm>
  10. #include <cstdlib>
  11. #include <fstream>
  12. #include "YunDaISASImageRecognitionService.h"
  13. #include "DisconnectorDectect.h"
  14. #include "OilLevelDectect.h"
  15. #include "LightDectect.h"
  16. #include "AirSwitchDectect.h"
  17. #include "ChangeoverSwitchDectect.h"
  18. #include "IndoorDisconnectorDectect.h"
  19. #include "MeterDectect.h"
  20. #include "CharacterDectect.h"
  21. #include "DisconnectorStateDectect.h"
  22. #include "ElectronPlateDectect.h"
  23. #include "ClassifyDectect.h"
  24. #include "AppearanceClassifyDectect.h"
  25. #include "NumberDectect.h"
  26. #include "InstructionsDectect.h"
  27. #include "ContactDectect.h"
  28. #include "TriangleDisconnectorDectect.h"
  29. #include "OperatingHandleStateDectect.h"
  30. #include "PressplateDectect.h"
  31. #include "PersonBehaviorDetect.h"
  32. #include "InsulatorDetect.h"
  33. #include "CircleOffOnPlateDectect.h"
  34. using namespace std;
  35. using json = nlohmann::json;
  36. class JdydAlgorithnm
  37. {
  38. private:
  39. static void GetMaxConfidenceRecoResult(string& tempResult, string& tempResultValue,const string instructionsDectectResultStr, vector<Output> result, int maxCenterBoxId, const int pluginNameId, const cv::Mat ROI);
  40. static void AppearanceGetMaxConfidenceRecoResult(string& tempResult, string& tempResultValue, const string instructionsDectectResultStr, vector<Output2> result2, int maxCenterBoxId, const int pluginNameId, const cv::Mat ROI);
  41. public:
  42. //static JdydAlgorithnm& getInstance();
  43. static json CallAlgorithnm(string pluginName, string filePath, string modelPath, int* roiVec, string pcArg);
  44. static bool Init();
  45. static ClassifyDectect& GetClassifyDectectInstance();
  46. static DisconnectorDectect& GetdisconnectorDectectInstance();
  47. static OilLevelDectect& GetoilLevelDectectInstance();
  48. static LightDectect& GetlightDectectInstance();
  49. static AirSwitchDectect& GetairSwitchDectectInstance();
  50. static ChangeoverSwitchDectect& GetchangeoverSwitchDectectInstance();
  51. static IndoorDisconnectorDectect& GetindoorDisconnectorDectectInstance();
  52. static MeterDectect& GetmeterDectectInstance();
  53. static CharacterDectect& GetcharacterDectectInstance();
  54. static DisconnectorStateDectect& GetdisconnectorStateDectectInstance();
  55. static ElectronPlateDectect& GetelectronPlateDectectInstance();
  56. static NumberDectect& GeNumberDectectInstance();
  57. static OperatingHandleStateDectect& GetoperatingHandleStateDectectInstance();
  58. static PressplateDectect& GetpressplateDectectInstance();
  59. static PersonBehaviorDetect& GetpersonBehaviorDetectInstance();
  60. static CircleOffOnPlateDectect& GetcircleOffOnPlateDectectInstance();
  61. static AppearanceClassifyDectect& GetAppearanceClassifyDectectInstance();
  62. static InsulatorDetect& GetInsulatorDetectInstance();
  63. };