Blame view

src/MSRegionSurveilance/help.h 1.74 KB
8805b950   Liu Meng   物品遗留效果优化
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
  #ifndef HELP_H_
  #define HELP_H_
  #include "MSRegionSurveilance.h"
  #include <time.h>
  #define MergeMinDistance 15	//相邻合并需要满足的最小距离 //by zl 20160307
  
  /******************************************************************************
  * Function:        SortByPoint
  * Description:	   以左上角点坐标进行排序 1.x坐标升序 2.x相同时 y坐标升序
  *******************************************************************************/
  bool SortByPoint(const CForeground &C1,const CForeground  &C2);
  
  
  /******************************************************************************
  * Function:        MergeNeighborBox
  * Description:	   合并相邻两个框(包含 大框中含小框 的情况)
  * return:	NULL
  * comment:	以左上角点坐标进行排序 1.x坐标升序 2.x相同时 y坐标升序
  *******************************************************************************/
  void MergeNeighborBox(vector<CForeground> &ForegroundArray);
  
  
  /******************************************************************************
  * Function:        InRange
  * Description:	   判断x是否在边界内
  * return:	true: false:不是
  *******************************************************************************/
  bool InRange(int x, int boundary1, int boundary2);
  
  
  /******************************************************************************
  * Function:        NeighbourorSub
  * Description:	   判断c1 c2 是否相邻或者为包含关系
  * return:	true: false:不是
  * comment: 输入条件 c1.ceter.x < c2.ceter.x; 
  *		 c1.ceter.x == c2.ceter.x  c1.ceter.y <= c2.ceter.y
  *******************************************************************************/
  bool NeighbourorSub(CForeground c1, CForeground c2);
  
  int ifOverlapBox(CForeground iter1, CForeground iter2);
  void DislodgeOverlapBox(vector<CForeground> &ForegroundArray);
  
  int checkTime();
  
  #endif