#ifndef ANSANSMOT_H #define ANSANSMOT_H #define ANSMOT_API __declspec(dllexport) #include #include #include #include #include #include #include #include #include "ANSLicense.h" #include "LabVIEWHeader/extcode.h" namespace ANSCENTER { struct TrackerObject { std::string object_id; // Use to check if this object belongs to any camera int class_id; int track_id; float prob; float x; float y; float width; float height; float left; float top; float right; float bottom; }; //enum MOTType { // BYTETRACKNCNN = 0, // BYTETRACK = 1, // BYTETRACKEIGEN=2, // UCMC = 3, // OCSORT=4 //}; class ANSMOT_API ANSMOT { protected: bool _licenseValid{ false }; std::string _licenseKey; SPDLogger& _logger = SPDLogger::GetInstance("ANSMOT", false); void CheckLicense(); public: [[nodiscard]] virtual bool UpdateParameters(const std::string& trackerParameters); [[nodiscard]] virtual std::string Update(int modelId, const std::string& detectionData); [[nodiscard]] virtual std::vector UpdateTracker(int modelId, const std::vector &detectionObjects); virtual ~ANSMOT(); [[nodiscard]] virtual bool Destroy() = 0; }; } extern "C" __declspec(dllexport) int __cdecl CreateANSMOTHandle(ANSCENTER::ANSMOT **Handle, int motType); extern "C" __declspec(dllexport) int __cdecl ReleaseANSMOTHandle(ANSCENTER::ANSMOT **Handle); extern "C" __declspec(dllexport) int __cdecl UpdateANSMOTParameters(ANSCENTER::ANSMOT **Handle, const char* ); extern "C" __declspec(dllexport) int __cdecl UpdateANSMOT(ANSCENTER::ANSMOT **Handle, int modelId, const char* detectionData, std::string &result); extern "C" __declspec(dllexport) int __cdecl UpdateANSMOT_LV(ANSCENTER::ANSMOT * *Handle, int modelId, const char* detectionData, LStrHandle trackerResult); extern "C" __declspec(dllexport) int __cdecl UpdateANSMOTTracker(ANSCENTER::ANSMOT** Handle, int modelId, const std::vector& detectionObjects, std::vector& trackedObjects); #endif // ANSMOT