#pragma once #ifndef _DETFEA_LIB_H_ #define _DETFEA_LIB_H_ #include <vector> #include "opencv2/opencv.hpp" #define DETFEA_CLS_TOP_N 10 #define DETFEA_FEAT_DIM 160 #define DETFEA_ALL_OK 0x00000000 // #define DETFEA_HANDLE_NULL 0x10050001 // ������Ϊ�� #define DETFEA_INPUT_IMAGE_EMPTY 0x10050002 // ����ͼ��Ϊ�� #define DETFEA_OUTPUT_NULL 0x10050003 // ���������ṹ��Ϊ�� typedef struct _DETFEA_INPUT_ { cv::Mat img; }DETFEA_INPUT; typedef struct _DETFEA_SINGLE_OUTPUT_ { float x1; float y1; float x2; float y2; float prob; int id; int label; float feat[DETFEA_FEAT_DIM]; }DETFEA_SINGLE_OUTPUT; typedef struct _DETFEA_OUTPUT_ { std::vector < DETFEA_SINGLE_OUTPUT> output_list; }DETFEA_OUTPUT; // �����㷨��ʶ���豸 typedef enum _DETFEA_DEVICE_ { DETFEA_CPU = 0x0000, // CPU DETFEA_GPU = 0x0001, // GPU }DETFEA_DEVICE; /*************************************************************************************************** * �� ��: ��ʼ�� * �� ��: * const char* model_path - I ģ��·��(���������ΪNULL����ʾ�����õ�ģ��) * DETFEA_DEVICE device_name - I �豸���� * void** detfea_handle - O ��� * ����ֵ: ������ ***************************************************************************************************/ int DETFEA_Init(const char* model_path1, const char* model_path2, DETFEA_DEVICE device_type, void** handle); /*************************************************************************************************** * �� ��: ʶ�� * �� ��: * DETFEA_INPUT in_img - I ����ͼƬ * DETFEA_OUTPUT* detfea_output - O ����ʶ���� * void* handle - I ��� * ����ֵ: ������ ***************************************************************************************************/ int DETFEA_Process(DETFEA_INPUT in_img, DETFEA_OUTPUT* detfea_output, void* handle); /*************************************************************************************************** * �� ��: �ͷž�� * �� ��: * void** handle - I ��� * ����ֵ: ������ ***************************************************************************************************/ int DETFEA_Release(void** handle); #endif