#ifndef __ARITH_NANO_TRACKER_API_H__ #define __ARITH_NANO_TRACKER_API_H__ #include "gd_alg_type.h" //#include "detection_type_api.h" #include "Arith_CommonDef.h" #include "PlatformDefine.h" #include //using namespace AIGO; using std::vector; #ifdef __cplusplus extern "C" { #endif // AI识别目标 typedef struct tag_AI_Target { /* data */ float x1; float y1; float x2; float y2; float score; int classNum; int ID; int trackID; float area; }AI_Target; /** * @brief Load config and create GUD_OT_V2 handle. * @param handle give back GUD_OT_V2 handle. * @param config set config for create ocrnet handle. * @return return true if success, false otherwise. */ GUD_API int GUD_ALG_AI_TRACK_Create(ArithHandle *handle, const gud_nano_config_t *config); /** * @brief Init tracker use initRect. * @param handle give back GUD_OT_V2 handle. * @param GD_VIDEO_FRAME_S image get image data from stream. * @param initRect set GUD_OT_V2 detect object infomations. * @param od_res get ai detection results infomations. * @param pAiOut get GUD_OT_V2 ot results infomations. * @return return true if success, false otherwise. */ GUD_API int GUD_ALG_AI_TRACK_Init(ArithHandle handle, GD_VIDEO_FRAME_S image, gud_rect_f initRect, std::vector od_res, AIT_OUTPUT *pAiOut); /** * @brief Do tracker update process by tracker. * @param handle give back GUD_OT_V2 handle. * @param GD_VIDEO_FRAME_S image get image data from stream. * @param searchBox get manual set track search region. * @param od_res get ai detection results infomations. * @param pAiOut get GUD_OT_V2 ot results infomations. * @return return true if success, false otherwise. */ GUD_API int GUD_ALG_AI_TRACK_Process(ArithHandle handle, GD_VIDEO_FRAME_S image, gud_rect_f searchBox, std::vector od_res, AIT_OUTPUT *pAiOut); /** * @brief unlock track target but keep track handle . * @param handle give back GUD_OT_V2 handle. * @return return true if success, false otherwise. */ GUD_API int GUD_ALG_AI_TRACK_Unlock(ArithHandle handle); /** * @brief Release GUD_OT_V2 handle. * @param handle give back GUD_OT_V2 handle. * @return return true if success, false otherwise. */ GUD_API int GUD_ALG_AI_TRACK_Release(ArithHandle handle); // 该接口仅针对调试模型下,将跟踪器响应图传出 GUD_API int GUD_ALG_AI_TRACK_Get_ResopneMap(ArithHandle handle,unsigned char *map); #ifdef __cplusplus } #endif #endif // __ARITH_NANO_TRACKER_API_H__