#include "opencv2/opencv.hpp" #include "GCycleQueue.h" #include "API_AIDetect.h" typedef enum{ IR = 1, VIS = 2 }MODE; class YOLO:public API_AI_Detector { public: YOLO(int nFrameCnt, bool do_classify, GD_PIXEL_FORMAT_E pixcelFormat, GLB_SCEN_MODE sceneType); ~YOLO(); // 异步调用接口 void run_detect(GD_VIDEO_FRAME_S img); // 同步调用接口 int detect(GD_VIDEO_FRAME_S img, bool do_classify = false); // 获取目标列表 std::vector& getTargetVec(bool do_classify = false); private: YOLO_ONNX_Detector* m_pYoloModule; std::vector m_targetArray; YoloParam m_para; MODE ImageType; // 图像类型 Frame* m_Frame; private: void ThreadFuncDetect(); GCycleQueue m_DataQueue; std::mutex m_mutex; };