sy_common.h 1.92 KB
#ifndef __SY_COMMON_H__
#define __SY_COMMON_H__

#define DEVICE_GPU 10
#define DEVICE_CPU 11


#define MODEL_SSD 100
#define MODEL_FPN 101
#define MODEL_CLASSFY 102
#define MODEL_CRNN 103
#define MODEL_SSD_FACE 104
#define MODEL_POSE_COCO 105
#define MODEL_RFCN 106
#define MODEL_CRNN_CNW 107 
#define MODEL_SSD_LDMK 109
#define MODEL_CTDET 110
#define MODEL_CTDET_FEATURE 111

#define ENGINE_MCAFFE2 200
#define ENGINE_TENSORRT 201


//��Զ๦��SDK�����ڳ�ʼ���������ã����ݸò������ж�����Ӧ�Ĺ���ģ���Ƿ���������
#ifndef __SY_COMMAND__
#define __SY_COMMAND__
typedef enum sy_command {
	SY_CONFIG_OPEN,			//�ù�������
	SY_CONFIG_CLOSE			//�ù��ܲ�����
};
#endif


//����ָ�������ͼ�����ݵĸ�ʽ
#ifndef __SY_FORMAT__
#define __SY_FORMAT__
typedef enum sy_format {
	SY_FORMAT_BGR888,		//Ŀǰֻ֧�ָ��ֽ����ʽ
	SY_FORMAT_BGRA888,
	SY_FORMAT_GRAY8,
	SY_FORMAT_YUV4420P,
	SY_FORMAT_NV12,
	SY_FORMAT_NV21
};
#endif

//Point
#ifndef __SY_POINT__
#define __SY_POINT__
typedef struct sy_point
{
	int x_;
	int y_;
	sy_point(int m_x, int m_y) :x_(m_x), y_(m_y) {};
	sy_point() {};
} sy_point;
#endif


//Rect
#ifndef __SY_RECT__
#define __SY_RECT__
typedef struct sy_rect
{
	int left_;
	int top_;
	int width_;
	int height_;
	sy_rect(int m_left, int m_top, int m_width, int m_height) :left_(m_left), top_(m_top), width_(m_width), height_(m_height) {};
	sy_rect() {};
} sy_rect;
#endif


//ImgData
#ifndef __SY_IMG__	
#define __SY_IMG__
typedef struct sy_img
{
	unsigned char * data_;
	int w_;
	int h_;
	int c_;
	void set_data(int m_w, int m_h, int m_c, unsigned char * m_data)
	{
		w_ = m_w;
		h_ = m_h;
		c_ = m_c;
		data_ = m_data;	//Shallow copy
	}
} sy_img;
#endif


#endif //__SY_COMMON_H__