header.h
1.16 KB
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
#pragma once
#define MAXVERTEXNUM 10
#define MAXTRACENUM 200 //轨迹最大长度
#ifndef __MS_TRACE__
#define __MS_TRACE__
#include "sy_common.h"
// 运动目标坐标及轨迹
typedef struct ms_trace {
int trace_num; // 轨迹长度,描述pObjTrace的长度
sy_point obj_trace[MAXTRACENUM]; // 轨迹,点坐标
}ms_trace;
#endif
#ifndef __REGION_INFO__
#define __REGION_INFO__
typedef struct region_info {
bool alarm_human; // 进入禁区 离开禁区 单向越界 双向越界 徘徊 - 报警
bool alarm_stay; // 丢包 - 报警
int point_num;
sy_point p_roi[MAXVERTEXNUM];
long frame_num; // 逗留时间 单位帧数
sy_point dir_point;
int finaldir; //无须用户指定
sy_point arrow_start_point; //箭头的起始端点 箭头指向正方形
sy_point arrow_end_point; //箭头的终止端点 箭头指向正方形
}region_info;
#endif
#ifndef __CMPOINT__
#define __CMPOINT__
class CMPoint
{
public:
int x;
int y;
bool operator == (const CMPoint& InOne)
{
if (x == InOne.x && y == InOne.y)
{
return true;
}
else
{
return false;
}
}
CMPoint(int inX, int inY)
{
x = inX;
y = inY;
}
CMPoint()
{
x = 0;
y = 0;
}
};
#endif