/******************************************************************************************* * Version: VPT_x64_V2.0.0_20170705 * CopyRight: �п�Ժ�Զ����о���ģʽʶ��ʵ����ͼ����Ƶ�� * UpdateDate: 20170705 * Content: �˳�������� ********************************************************************************************/ #pragma once #include "opencv2/highgui/highgui.hpp" #include #include "utools.h" #include #include "common.h" using namespace std; #define VTTYPECOUNT 10 //֧�ֵ��������� typedef struct VPTProcess_PARAM { int mode; //����ģʽ(DEVICE_GPU / DEVICE_CPU) int gpuid; //ָ���Կ�id float threshold; int max_batch; int engine; //ָ����������(ENGINE_MCAFFE2 / ENGINE_TENSORRT) char* preprocess_param; char* serialize_file; char* auth_license; VPTProcess_PARAM() :mode(DEVICE_GPU), gpuid(0), threshold(0.6), max_batch(20) {}; }VPTProcess_PARAM; /************************************************************************* * FUNCTION: VPT_Init * PURPOSE: ��ʼ�� * PARAM: [in] vparam ���� * RETURN: handle * NOTES: *************************************************************************/ int VPT_Init(void *&handle, VPTProcess_PARAM vparam); /************************************************************************* * FUNCTION: VPT_Process * PURPOSE: �˳�������� * PARAM: [in] handle - ������� [in] rgb - ͼƬ���ݣ�3ͨ��BGR���� cv::Mat��ʽ�� [in] width - ͼƬ���� [in] height - ͼƬ�߶� [in] result - ������������ⲿ�����㹻�ڴ� [out] traffic - ��ͨ��������ṹ�� �ڴ����ⲿ���룬��С���ʼ��ʱ��������߸�����ͬ������ΪNULLʱ������ * RETURN: -1��ͼ����� ��������⵽�ĸ��� * NOTES: *************************************************************************/ int VPT_Process(void * handle, unsigned char ** bgr, int batchsize, VPT_Result * result); /************************************************************************* * FUNCTION: VPT_Process * PURPOSE: �˳�������� * PARAM: [in] handle - ������� [in] rgb - ͼƬ���ݣ�3ͨ��BGR���� cv::Mat��ʽ�� [in] width - ͼƬ���� [in] height - ͼƬ�߶� [in] result - ������������ⲿ�����㹻�ڴ� [in] deleteObjectID - ɾ���Ĺ켣ID�� [out] traffic - ��ͨ��������ṹ�� �ڴ����ⲿ���룬��С���ʼ��ʱ��������߸�����ͬ������ΪNULLʱ������ * RETURN: -1��ͼ����� ��������⵽�ĸ��� * NOTES: *************************************************************************/ //startBatch ��batchΪ�˼����Դ棬���д��� - add by lm //int VPT_Process_GPU(void * handle, float * bgr, int width, int height, int startBatch, int batchsize, VPT_Result * result, vector>& deleteObjectID); int VPT_Process_GPU(void * handle, sy_img * batch_img, int startBatch, int batchsize, vector vec_frameIndex, vector& result, vector>& deleteObjectID, vector>& unUsedResult); /************************************************************************* * FUNCTION: VPT_ProcessImage * PURPOSE: �˳�����-ͼƬ * PARAM: [in] handle - ������� [in] rgb - ͼƬ���ݣ�3ͨ��BGR���� cv::Mat��ʽ�� [in] width - ͼƬ���� [in] height - ͼƬ�߶� [in] result - ������������ⲿ�����㹻�ڴ� * RETURN: -1��ͼ����� ��������⵽�ĸ��� * NOTES: *************************************************************************/ int VPT_ProcessImage(void * handle, unsigned char ** bgr, int batchsize, VPT_Result * result); /************************************************************************* * FUNCTION: VPT_Release * PURPOSE: ��Դ�ͷ� * PARAM: [in] handle - ������� * RETURN: NULL * NOTES: *************************************************************************/ void VPT_Release(void * handle); void AddTaskTracker(void * handle, const int taskID, const double rWidth, const double rHeight); void FinishTaskTracker(void * handle, const int taskID); void PauseTaskTracker(void * handle, const int taskID); void RestartTaskTraker(void * handle, const int taskID); void DrawTracker(void * handle, const int taskID, cv::Mat *img);