JdydAlgorithnm.cpp 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. #include "JdydAlgorithnm.h"
  2. static ClassifyDectect classifyDectect;
  3. static DisconnectorDectect disconnectorDectect;
  4. static OilLevelDectect oilLevelDectect;
  5. static LightDectect lightDectect;
  6. static AirSwitchDectect airSwitchDectect;
  7. static ChangeoverSwitchDectect changeoverSwitchDectect;
  8. static IndoorDisconnectorDectect indoorDisconnectorDectect;
  9. static TriangleDisconnectorDectect triangleDisconnectorDectect;
  10. static MeterDectect meterDectect;
  11. static CharacterDectect characterDectect;
  12. static DisconnectorStateDectect disconnectorStateDectect;
  13. static ElectronPlateDectect electronPlateDectect;
  14. static NumberDectect numberDectect;
  15. static InstructionsDectect instructionsDectect;
  16. static ContactDectect contactDectect;
  17. static OperatingHandleStateDectect operatingHandleStateDectect;
  18. static PressplateDectect pressplateDectect;
  19. static PersonBehaviorDetect personBehaviorDetect;
  20. bool JdydAlgorithnm::Init()
  21. {
  22. try
  23. {
  24. bool isCuda = false;
  25. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  26. classifyDectect.Init(isCuda);
  27. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("分类模型"));
  28. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  29. disconnectorDectect.Init(isCuda);
  30. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("隔离开关模型"));
  31. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  32. operatingHandleStateDectect.Init(isCuda);
  33. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("操作手柄模型"));
  34. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  35. personBehaviorDetect.Init(isCuda);
  36. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("安全防范模型"));
  37. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  38. pressplateDectect.Init(isCuda);
  39. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("压板模型"));
  40. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  41. oilLevelDectect.Init(isCuda);
  42. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("油位模型"));
  43. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  44. lightDectect.Init(isCuda);
  45. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("信号灯模型"));
  46. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  47. airSwitchDectect.Init(isCuda);
  48. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("空开模型"));
  49. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  50. changeoverSwitchDectect.Init(isCuda);
  51. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("旋转开关模型"));
  52. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  53. indoorDisconnectorDectect.Init(isCuda);
  54. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("竖直隔离开关模型"));
  55. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  56. triangleDisconnectorDectect.Init(isCuda);
  57. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("三角隔离开关模型"));
  58. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  59. meterDectect.Init(isCuda);
  60. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("仪表模型"));
  61. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  62. characterDectect.Init(isCuda);
  63. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("字符型模型"));
  64. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  65. disconnectorStateDectect.Init(isCuda);
  66. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("隔离开关室内状态模型"));
  67. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  68. electronPlateDectect.Init(isCuda);
  69. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("电子数字表盘模型"));
  70. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  71. numberDectect.Init(isCuda);
  72. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("数字识别模型"));
  73. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  74. instructionsDectect.Init(isCuda);
  75. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("标识识别模型"));
  76. QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
  77. contactDectect.Init(isCuda);
  78. YunDaISASImageRecognitionService::ConsoleLog(QStringLiteral("连接点识别模型"));
  79. }
  80. catch (const std::exception& ex)
  81. {
  82. YunDaISASImageRecognitionService::ConsoleLog(ex.what());
  83. }
  84. return true;
  85. }
  86. json JdydAlgorithnm::CallAlgorithnm(string pluginName, string filePath, string modelPath, int* roiVec, string pcArg)
  87. {
  88. cv::Mat img = cv::imread(filePath);
  89. int imgWidth = (roiVec[4] - roiVec[0])<1 || (roiVec[4] - roiVec[0]) > img.cols ? img.cols: (roiVec[4] - roiVec[0]);
  90. int imgheight =(roiVec[5] - roiVec[1])<1 || (roiVec[5] - roiVec[1]) > img.rows ? img.rows : (roiVec[5] - roiVec[1]);
  91. int topX = roiVec[0] <0 || roiVec[0]> img.cols ? 0: roiVec[0];
  92. int topY = roiVec[1] < 0 || roiVec[1]> img.rows ? 0 : roiVec[1];
  93. if (topX+ imgWidth> img.cols)
  94. {
  95. topX = 0;
  96. imgWidth = img.cols;
  97. }
  98. if (topY+ imgheight> img.rows)
  99. {
  100. topY = 0;
  101. imgheight = img.rows;
  102. }
  103. cv::Rect rect(topX, topY, imgWidth, imgheight);
  104. cv::Mat ROI = img(rect);
  105. string tempPath = "test.png";
  106. vector<Output> result;
  107. if (classifyDectect.Detect(ROI, result))
  108. {
  109. if (YunDaISASImageRecognitionService::GetIsShowDectect())
  110. {
  111. cv::Mat drawROI;
  112. ROI.copyTo(drawROI);
  113. classifyDectect.drawPred(drawROI, result);
  114. imwrite("test.png", drawROI);
  115. YunDaISASImageRecognitionService::SetImage(QString::fromStdString(tempPath));
  116. }
  117. }
  118. string rstStr = "";
  119. string rstValue = "";
  120. int flag = -1;
  121. vector <string> rstStrArr;
  122. vector<vector<int>> rstRoiArr;
  123. if (1 <= result.size())
  124. {
  125. float confidenceMax = 0;
  126. int confidenceMaxId = 0;
  127. int closestCenterPoint = ROI.cols + ROI.rows;
  128. int centerX = ROI.cols / 2;
  129. int centerY = ROI.rows / 2;
  130. int maxCenterBoxId = 0;
  131. float instructionsConfidenceMax = 0;
  132. int instructionsConfidenceMaxId = -1;
  133. float pluginNameConfidenceMax = 0;
  134. int pluginNameId = -1;
  135. for (size_t i = 0; i < result.size(); i++)
  136. {
  137. int absX = cv::abs((result[i].box.x + result[i].box.width / 2) - centerX);
  138. int absY = cv::abs((result[i].box.y + result[i].box.height / 2) - centerY);
  139. if (classifyDectect.className[result[i].id] == classifyDectect.instructionsName)
  140. {
  141. if (result[i].confidence> instructionsConfidenceMax)
  142. {
  143. instructionsConfidenceMax = result[i].confidence;
  144. instructionsConfidenceMaxId = i;
  145. }
  146. }
  147. else if (pluginName.size()>0 && classifyDectect.className[result[i].id] == pluginName)
  148. {
  149. if (result[i].confidence > pluginNameConfidenceMax)
  150. {
  151. pluginNameConfidenceMax = result[i].confidence;
  152. pluginNameId = i;
  153. }
  154. }
  155. else
  156. {
  157. if (result[i].confidence > confidenceMax)
  158. {
  159. confidenceMax = result[i].confidence;
  160. confidenceMaxId = i;
  161. }
  162. if (absX + absY < closestCenterPoint)
  163. {
  164. closestCenterPoint = absX + absY;
  165. maxCenterBoxId = i;
  166. }
  167. }
  168. vector<int> vecRec;
  169. vecRec.push_back(result[i].box.x);
  170. vecRec.push_back(result[i].box.y);
  171. vecRec.push_back(result[i].box.width);
  172. vecRec.push_back(result[i].box.height);
  173. rstRoiArr.push_back(vecRec);
  174. rstStrArr.push_back(classifyDectect.className[result[i].id]);
  175. }
  176. /*if (!YunDaISASImageRecognitionService::GetReconginzeStratgy())
  177. {
  178. maxCenterBoxId = confidenceMaxId;
  179. }*/
  180. string instructionsDectectResultStr = "";
  181. if (instructionsConfidenceMaxId!=-1)
  182. {
  183. IDetection::DectectResult dectectResult = instructionsDectect.GetStateResult(ROI, result[instructionsConfidenceMaxId].box);
  184. instructionsDectectResultStr = dectectResult.m_sValue;
  185. }
  186. /* string tempResult = "";
  187. string tempResultValue = "";*/
  188. GetMaxConfidenceRecoResult(rstStr, rstValue, instructionsDectectResultStr,result, maxCenterBoxId, pluginNameId,ROI);
  189. /* rstStr = tempResult;
  190. rstValue = tempResultValue;*/
  191. }
  192. else
  193. {
  194. if (pluginName.size() > 0)
  195. {
  196. for (size_t i = 0; i < classifyDectect.className.size(); i++)
  197. {
  198. if (classifyDectect.className[i] == pluginName)
  199. {
  200. Output pluginNameOutput;
  201. pluginNameOutput.box.x = 0;
  202. pluginNameOutput.box.y = 0;
  203. pluginNameOutput.box.width = ROI.cols;
  204. pluginNameOutput.box.height = ROI.rows;
  205. pluginNameOutput.id = i;
  206. pluginNameOutput.confidence = 0.99;
  207. result.push_back(pluginNameOutput);
  208. int pluginNameId = 0;
  209. string instructionsDectectResultStr = "";
  210. int maxCenterBoxId = 0;
  211. GetMaxConfidenceRecoResult(rstStr, rstValue, instructionsDectectResultStr, result, maxCenterBoxId, pluginNameId, ROI);
  212. }
  213. }
  214. }
  215. }
  216. if (rstStr.size()>300)
  217. {
  218. rstStr = "";
  219. }
  220. json resultJson = { {"flag", flag}, {"result" , rstStr}, {"resultValue" , rstValue},{"results" , rstStrArr} ,{"resultRois",rstRoiArr}};
  221. return resultJson;
  222. }
  223. /// <summary>
  224. /// 获取
  225. /// </summary>
  226. /// <param name="tempResult"></param>
  227. /// <param name="tempResultValue"></param>
  228. /// <param name="instructionsDectectResultStr"></param>
  229. /// <param name="result"></param>
  230. /// <param name="maxCenterBoxId"></param>
  231. /// <param name="pluginNameId"></param>
  232. /// <param name="ROI"></param>
  233. void JdydAlgorithnm::GetMaxConfidenceRecoResult(string &tempResult, string &tempResultValue, const string instructionsDectectResultStr,vector<Output> result, int maxCenterBoxId,const int pluginNameId,const cv::Mat ROI)
  234. {
  235. if (pluginNameId > -1)
  236. {
  237. maxCenterBoxId = pluginNameId;
  238. }
  239. cv::Rect boxTemp = result[maxCenterBoxId].box;
  240. if (boxTemp.x<0 ||
  241. boxTemp.y < 0 ||
  242. boxTemp.x + boxTemp.width>ROI.cols ||
  243. boxTemp.y + boxTemp.height>ROI.rows)
  244. {
  245. boxTemp.x = 0;
  246. boxTemp.y = 0;
  247. boxTemp.width = ROI.cols;
  248. boxTemp.height = ROI.rows;
  249. }
  250. result[maxCenterBoxId].box = boxTemp;
  251. if (classifyDectect.className[result[maxCenterBoxId].id] == "disconnector")//隔离开关
  252. {
  253. IDetection::DectectResult dectectResultVec = disconnectorDectect.GetStateResult(ROI, result[maxCenterBoxId].box);
  254. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;
  255. }
  256. else if (classifyDectect.className[result[maxCenterBoxId].id] == "oil_level")//油位
  257. {
  258. IDetection::DectectResult dectectResultVec = oilLevelDectect.GetDigitResult(ROI, result[maxCenterBoxId].box);
  259. if (dectectResultVec.m_sValue != "")
  260. {
  261. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;
  262. }
  263. else {
  264. tempResult = classifyDectect.className[result[maxCenterBoxId].id];
  265. }
  266. tempResultValue = std::to_string(dectectResultVec.m_dValue);
  267. }
  268. else if (classifyDectect.className[result[maxCenterBoxId].id] == "meter")//指针表盘
  269. {
  270. auto dectectResults = meterDectect.GetDigitResults(ROI, result[maxCenterBoxId].box);
  271. if (dectectResults.size() > 0)
  272. {
  273. for (size_t i = 0; i < dectectResults.size(); i++)
  274. {
  275. string tempResultItem = "";
  276. string tempResultValueItem = "";
  277. if (dectectResults[i].m_sValue != "")
  278. {
  279. tempResultItem = "meter_" + dectectResults[i].m_sValue;
  280. }
  281. else {
  282. tempResultItem = classifyDectect.className[result[maxCenterBoxId].id];
  283. }
  284. tempResultValueItem = std::to_string(dectectResults[i].m_dValue);
  285. if (tempResultValueItem != "" && tempResultItem != "")
  286. {
  287. if (tempResult == "")
  288. {
  289. tempResult += tempResultItem;
  290. tempResultValue += tempResultValueItem;
  291. }
  292. else
  293. {
  294. tempResult += ";";
  295. tempResult += tempResultItem;
  296. tempResultValue += ";";
  297. tempResultValue += tempResultValueItem;
  298. }
  299. }
  300. }
  301. }
  302. else {
  303. tempResult = "meter_" + meterDectect.GetDigitResult(ROI, result[maxCenterBoxId].box).m_sValue;
  304. }
  305. }
  306. else if (classifyDectect.className[result[maxCenterBoxId].id] == "changeover_switch")
  307. {
  308. IDetection::DectectResult dectectResultVec = changeoverSwitchDectect.GetStateResult(ROI, result[maxCenterBoxId].box);
  309. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;
  310. }
  311. else if (classifyDectect.className[result[maxCenterBoxId].id] == "pressplate")
  312. {
  313. IDetection::DectectResult dectectResultVec = pressplateDectect.GetStateResult(ROI, result[maxCenterBoxId].box);
  314. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;
  315. }
  316. else if (classifyDectect.className[result[maxCenterBoxId].id] == "disconnector_state")
  317. {
  318. IDetection::DectectResult dectectResultVec = disconnectorStateDectect.GetStateResult(ROI, result[maxCenterBoxId].box);
  319. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;
  320. }
  321. else if (classifyDectect.className[result[maxCenterBoxId].id] == "light")
  322. {
  323. IDetection::DectectResult dectectResultVec = lightDectect.GetStateResult(ROI, result[maxCenterBoxId].box);
  324. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;
  325. }
  326. else if (classifyDectect.className[result[maxCenterBoxId].id] == "air_switch")
  327. {
  328. IDetection::DectectResult dectectResultVec = airSwitchDectect.GetStateResult(ROI, result[maxCenterBoxId].box);
  329. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;
  330. }
  331. else if (classifyDectect.className[result[maxCenterBoxId].id] == "character")
  332. {
  333. IDetection::DectectResult dectectResultVec = characterDectect.GetStateResult(ROI, result[maxCenterBoxId].box);
  334. if (characterDectect.GetStateResults().size() > 0)
  335. {
  336. string tempResultItem = "";
  337. for (size_t i = 0; i < characterDectect.GetStateResults().size(); i++)
  338. {
  339. if (tempResultItem == "")
  340. {
  341. tempResultItem += "character_" + characterDectect.GetStateResults()[i].m_sValue;
  342. }
  343. else
  344. {
  345. tempResultItem += ";";
  346. tempResultItem += "character_" + characterDectect.GetStateResults()[i].m_sValue;
  347. }
  348. }
  349. tempResult = tempResultItem;
  350. }
  351. else
  352. {
  353. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;
  354. }
  355. }
  356. else if (classifyDectect.className[result[maxCenterBoxId].id] == "indoor_disconnector")
  357. {
  358. IDetection::DectectResult dectectResultVec = indoorDisconnectorDectect.GetStateResult(ROI, result[maxCenterBoxId].box);
  359. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;
  360. }
  361. else if (classifyDectect.className[result[maxCenterBoxId].id] == "triangle_disconnector")
  362. {
  363. IDetection::DectectResult dectectResultVec = triangleDisconnectorDectect.GetStateResult(ROI, result[maxCenterBoxId].box);
  364. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;
  365. }
  366. else if (classifyDectect.className[result[maxCenterBoxId].id] == "electron_plate")//电子数字盘
  367. {
  368. auto dectectResults = electronPlateDectect.GetDigitResults(ROI, result[maxCenterBoxId].box);
  369. if (dectectResults.size() > 0)
  370. {
  371. for (size_t i = 0; i < dectectResults.size(); i++)
  372. {
  373. string tempResultItem = "";
  374. string tempResultValueItem = "";
  375. if (dectectResults[i].m_sValue != "digit")
  376. {
  377. tempResultItem = "electron_plate_" + dectectResults[i].m_sValue;
  378. //tempResult = tempResultItem;
  379. }
  380. else {
  381. tempResultItem = "electron_plate_" + dectectResults[i].m_sValue;
  382. tempResultValueItem = std::to_string(dectectResults[i].m_dValue);
  383. }
  384. if (tempResultItem != "")
  385. {
  386. if (tempResult == "")
  387. {
  388. tempResult += tempResultItem;
  389. tempResultValue += tempResultValueItem;
  390. }
  391. else
  392. {
  393. tempResult += ";";
  394. tempResult += tempResultItem;
  395. tempResultValue += ";";
  396. tempResultValue += tempResultValueItem;
  397. }
  398. }
  399. }
  400. }
  401. else {
  402. auto resultStateValue = electronPlateDectect.GetDigitResult(ROI, result[maxCenterBoxId].box).m_sValue;
  403. if (resultStateValue == "") {
  404. tempResult = "electron_plate";
  405. }
  406. else {
  407. tempResult = "electron_plate_" + resultStateValue;
  408. }
  409. }
  410. }
  411. else if (classifyDectect.className[result[maxCenterBoxId].id] == "contact")
  412. {
  413. IDetection::DectectResult dectectResultVec = contactDectect.GetStateResult(ROI, result[maxCenterBoxId].box);
  414. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;
  415. }
  416. else if (classifyDectect.className[result[maxCenterBoxId].id] == "operating_handle")
  417. {
  418. IDetection::DectectResult dectectResultVec = operatingHandleStateDectect.GetStateResult(ROI, result[maxCenterBoxId].box);
  419. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;
  420. }
  421. else if (classifyDectect.className[result[maxCenterBoxId].id] == "person")
  422. {
  423. IDetection::DectectResult dectectResultVec = personBehaviorDetect.GetStateResult(ROI, result[maxCenterBoxId].box);
  424. if (dectectResultVec.m_sValue != "")
  425. {
  426. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;
  427. }
  428. else {
  429. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_";
  430. }
  431. /*IDetection::DectectResult dectectResultVec = personBehaviorDetect.GetStateResult(ROI, result[maxCenterBoxId].box);
  432. tempResult = classifyDectect.className[result[maxCenterBoxId].id] + "_" + dectectResultVec.m_sValue;*/
  433. }
  434. }
  435. ClassifyDectect& JdydAlgorithnm::GetClassifyDectectInstance() {
  436. return classifyDectect;
  437. }
  438. DisconnectorDectect& JdydAlgorithnm::GetdisconnectorDectectInstance() {
  439. return disconnectorDectect;
  440. }
  441. OilLevelDectect& JdydAlgorithnm::GetoilLevelDectectInstance() {
  442. return oilLevelDectect;
  443. }
  444. LightDectect& JdydAlgorithnm::GetlightDectectInstance(){
  445. return lightDectect;
  446. }
  447. AirSwitchDectect& JdydAlgorithnm::GetairSwitchDectectInstance() {
  448. return airSwitchDectect;
  449. }
  450. ChangeoverSwitchDectect& JdydAlgorithnm::GetchangeoverSwitchDectectInstance() {
  451. return changeoverSwitchDectect;
  452. }
  453. IndoorDisconnectorDectect& JdydAlgorithnm::GetindoorDisconnectorDectectInstance() {
  454. return indoorDisconnectorDectect;
  455. }
  456. MeterDectect& JdydAlgorithnm::GetmeterDectectInstance() {
  457. return meterDectect;
  458. }
  459. CharacterDectect& JdydAlgorithnm::GetcharacterDectectInstance() {
  460. return characterDectect;
  461. }
  462. DisconnectorStateDectect& JdydAlgorithnm::GetdisconnectorStateDectectInstance() {
  463. return disconnectorStateDectect;
  464. }
  465. ElectronPlateDectect& JdydAlgorithnm::GetelectronPlateDectectInstance() {
  466. return electronPlateDectect;
  467. }
  468. NumberDectect& JdydAlgorithnm::GeNumberDectectInstance()
  469. {
  470. return numberDectect;
  471. }
  472. OperatingHandleStateDectect& JdydAlgorithnm::GetoperatingHandleStateDectectInstance()
  473. {
  474. return operatingHandleStateDectect;
  475. }
  476. PressplateDectect& JdydAlgorithnm::GetpressplateDectectInstance()
  477. {
  478. return pressplateDectect;
  479. }
  480. PersonBehaviorDetect& JdydAlgorithnm::GetpersonBehaviorDetectInstance()
  481. {
  482. return personBehaviorDetect;
  483. }