VAT  3.0
Video Analysis Tool
common.h
1 #ifndef COMMON_H
2 #define COMMON_H
3 
4 #include <QString>
5 
6 enum ObjectType {
7  UNKNOWN = 0, // object type unknown
8  CROWD = 1, // object contains many many persons
9  PERSON_GROUP = 2, // may be a person, maybe a group
10  A_GROUP = 3, // object is a group
11  PERSON = 4, // object is a person
12  CONTX_OBJECT = 5, // object is a context object, ex: the door
13  VEHICLE = 6, // object is a vehicle, ex: metro, car
14  NOISE = 7, // noise
15  CAR = 9,
16  TRUCK = 10,
17  MOTORCYCLE = 11,
18  PART_OF_GROUP = 12, // object is a part of a group
19  PART_OF_PERSON_GROUP = 13, // object is a part of a person_group
20  UNDETERMINATE = 14, // object type is indeterminate
21  CHILD = 15,
22  PARKED_VEHICLE = 16,
23  FACE = 17,
24  TWOPERSONS = 18,
25  THREEPERSONS = 19,
26  PART_OF_PERSON =20, // object is a part of person
27  ANY2D = 21, // For learning context: Any class even UNKNOWN
28  ANY3D = 22, // For learning context: Any class without UNKNOWN
29  DEGU = 23, //Type for DeguObjectClass
30  TEAM_A = 24, //For sport environment
31  TEAM_B = 25, //For sport environment
32  GKEEPER_A = 26, //For sport environment
33  GKEEPER_B = 27, //For sport environment
34  REFEREE = 28, //For sport environment
35  FOOTBALL = 29, //For sport environment
36 };
37 
38 
39 enum ObjectSubtype {
40  ST_UNKNOWN = 0, // object subtype unknown
41  ST_UNDEFINED = 1, // object subtype undefined
42  ST_NO_SUBTYPES = 2, // constant for rigid objects
43  ST_STANDING = 3, // Standing posture
44  ST_CROUCHING = 4, // Crouching posture
45  ST_LYING = 5, // Lying posture
46 };
47 
48 //Coding by binary flags for blob detection problems to allow the representation of multiple types of occlusion at the same time
49 enum DetectionProblemType {
50  MM_DP_NONE = 0x00000000,//00000000000000000000000000000000, // no detection problem
51  MM_CAM_OCCL_BOTTOM = 0x00000001,//00000000000000000000000000000001, // only occlusion on image bottom
52  MM_CAM_OCCL_TOP = 0x00000002,//00000000000000000000000000000010, // only occlusion on image top
53  MM_CAM_OCCL_LEFT = 0x00000004,//00000000000000000000000000000100, // only occlusion on image left
54  MM_CAM_OCCL_RIGHT = 0x00000008,//00000000000000000000000000001000, // only occlusion on image right
55  MM_CAM_OCCL_BOTTOM_LEFT = 0x00000005,//00000000000000000000000000000101, // occlusion on bottom and left corner of image
56  MM_CAM_OCCL_BOTTOM_RIGHT = 0x00000009,//00000000000000000000000000001001, // occlusion on bottom and right corner of image
57  MM_CAM_OCCL_TOP_LEFT = 0x00000006,//00000000000000000000000000000110, // occlusion on top and left corner of image
58  MM_CAM_OCCL_TOP_RIGHT = 0x0000000A,//00000000000000000000000000001010, // occlusion on top and right corner of image
59  MM_CAM_OCCL_MASK = 0x0000000F,//00000000000000000000000000001111, // camera occlusion mask
60  MM_OBJECT_BOTTOM = 0x00000010,//00000000000000000000000000010000, // blob is occluded on bottom part by a context object
61  MM_OBJECT_TOP = 0x00000020,//00000000000000000000000000100000, // blob is occluded on top part by a context object
62  MM_OBJECT_LEFT = 0x00000040,//00000000000000000000000001000000, // blob is occluded on left part by a context object
63  MM_OBJECT_RIGHT = 0x00000080,//00000000000000000000000010000000, // blob is occluded on right part by a context object
64  MM_OBJECT_BOTTOM_LEFT = 0x00000050,//00000000000000000000000001010000, // blob is occluded on bottom-left part by a context object
65  MM_OBJECT_BOTTOM_RIGHT = 0x00000090,//00000000000000000000000010010000, // blob is occluded on bottom-right part by a context object
66  MM_OBJECT_TOP_LEFT = 0x00000060,//00000000000000000000000001100000, // blob is occluded on top-left part by a context object
67  MM_OBJECT_TOP_RIGHT = 0x000000A0,//00000000000000000000000010100000, // blob is occluded on top-right part by a context object
68  MM_OBJECT_OCCL_MASK = 0x000000F0,//00000000000000000000000011110000, // context object occlusion mask
69  MM_DYNAMIC_BOTTOM = 0x00000100,//00000000000000000000000100000000, // blob is occluded on bottom part by a mobile object
70  MM_DYNAMIC_TOP = 0x00000200,//00000000000000000000001000000000, // blob is occluded on top part by a mobile object
71  MM_DYNAMIC_LEFT = 0x00000400,//00000000000000000000010000000000, // blob is occluded on left part by a mobile object
72  MM_DYNAMIC_RIGHT = 0x00000800,//00000000000000000000100000000000, // blob is occluded on right part by a mobile object
73  MM_DYNAMIC_BOTTOM_LEFT = 0x00000500,//00000000000000000000010100000000, // blob is occluded on bottom-left part by a mobile object
74  MM_DYNAMIC_BOTTOM_RIGHT = 0x00000900,//00000000000000000000100100000000, // blob is occluded on bottom-right part by a mobile object
75  MM_DYNAMIC_TOP_LEFT = 0x00000600,//00000000000000000000011000000000, // blob is occluded on top-left part by a mobile object
76  MM_DYNAMIC_TOP_RIGHT = 0x00000A00,//00000000000000000000101000000000, // blob is occluded on top-right part by a mobile object
77  MM_DYNAMIC_OCCL_MASK = 0x00000F00,//00000000000000000000111100000000, // dynamic occlusion mask
78  MM_HORIZONTAL_OCCL_MASK = 0x000000CC,//00000000000000000000000011001100, // horizontal static occlusion mask
79  MM_VERTICAL_OCCL_MASK = 0x00000033,//00000000000000000000000000110011, // vertical static occlusion mask
80  MM_HORIZONTAL_DYN_MASK = 0x00000CCC,//00000000000000000000110011001100, // horizontal dynamic occlusion mask
81  MM_VERTICAL_DYN_MASK = 0x00000333,//00000000000000000000001100110011, // vertical dynamic occlusion mask
82  MM_BOTTOM_OCCL = 0x00000111,//00000000000000000000000100010001, // bottom occlusion
83  MM_TOP_OCCL = 0x00000222,//00000000000000000000001000100010, // top occlusion
84  MM_LEFT_OCCL = 0x00000444,//00000000000000000000010001000100, // left occlusion
85  MM_RIGHT_OCCL = 0x00000888,//00000000000000000000100010001000, // right occlusion
86  MM_TOTAL_OCCLUSION = 0x00010000,//00000000000000010000000000000000 // total occlusion of an object
87  MM_OBJECT_LOST = 0x00020000,//00000000000000100000000000000000, // blob is just an estimation based on previously obtained information, its data is unreliable
88  MM_NOT_VISIBLE_MASK = 0x00030000,//00000000000000110000000000000000, // not visible blob, lost or totally occluded
89  MM_PARTIALLY_DETECTED = 0x00040000,//00000000000001000000000000000000 // total occlusion of an object
90  MM_PART_OF_BIGGER = 0x00080000,//00000000000010000000000000000000 // total occlusion of an object
91  MM_NOT_3D_TRACKABLE_MASK = 0x000C0000,//00000000000011000000000000000000, // not visible blob, lost or totally occluded
92  MM_AOI_OUTSIDE = 0x02000000,//00000010000000000000000000000000, // blob is outside aoi ground
93  MM_AOI_REINSIDE = 0x04000000,//00000100000000000000000000000000, // blob is re-inside aoi ground
94  MM_OBJECT_INSIDE = 0x08000000 //00001000000000000000000000000000, // blob is inside object
95 };
96 
98 public:
99  static ObjectType getTypeFromName(QString name);
100  static QString getNameFromType(ObjectType type);
101 };
102 
103 
104 typedef double perspective_matrix[12];
105 typedef double homography_matrix[9];
106 
107 #endif // COMMON_H
Definition: common.h:97