Blame view

src/common/sy_common.h 1.92 KB
09c2d08c   Hu Chunming   arm交付版
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
  #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__