12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #ifndef __ABANDOBJAPP_H
- #define __ABANDOBJAPP_H
- #include "AbandObjCfg.h"
- #include "Locks.h"
- #include "ExHeaders.h"
- #include <opencv2/dnn.hpp>
- #include <opencv2/opencv.hpp>
- NAMESPACE_MAS_BEGIN
- NAMESPACE_ABANDOBJ_BEGIN
- class AbandObjApp {
-
- public:
- static AbandObjApp* Instance();
- static void DestroyInstance();
-
- TZ_INT Initialize(const std::string& initParam);
- TZ_INT SetDetectCfg(const std::string& initParam);
- TZ_INT Dispose();
-
- TZ_INT DoDetect(cv::Mat& input, std::vector<Proposal>& propRes);
-
- private:
- AbandObjApp();
- ~AbandObjApp();
- TZ_INT m_factor;
- TZ_DOUBLE m_shortTermRate;
- TZ_INT m_shortTermHistory;
- TZ_DOUBLE m_longTermRate;
- TZ_INT m_longTermHistory;
- TZ_DOUBLE m_varThreshold;
- TZ_BOOL m_detectShadows;
- TZ_DOUBLE m_iouThreshold;
- TZ_DOUBLE m_areaThreshold;
- TZ_DOUBLE m_perimeterThreshold;
- std::vector<Proposal> m_proposals;
- cv::Ptr<cv::BackgroundSubtractor> m_pLongBG, m_pShortBG;
- TZ_BOOL m_inited;
- TZ_INT m_usecnt;
- static tzc::Mutex _mutex;
- static AbandObjApp* _instance;
- };
- NAMESPACE_ABANDOBJ_END
- NAMESPACE_MAS_END
- #endif
|