help.h 1.74 KB
#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