?? staticdetect.h
字號:
#define BACK_ALL_NUM 100 //計算背景所需幀數
#define BACK_SEQ_NUM 3 //計算背景循環數目
#define THRESHOLD 20 //設置差分閾值
class CStaticDetect
{
public:
CStaticDetect(int nwidth, int nheight);
virtual ~CStaticDetect();
void ReceiveFrame(int index, BYTE* sBuf); //主調用函數
public:
BYTE *m_pCurImage; //當前圖像
BYTE *m_pDetectImage; //檢測結果圖像
int m_nFrame, count;
int WIDTH, HEIGHT,IMAGESIZE;
short int *m_pBackHistgram; //背景顏色統計
BYTE *m_pGrayImage; //當前灰度圖像
BYTE *m_pBackground; //背景
BYTE *m_pDiffImage; //差分圖像
UINT *m_pTemplate; //存取多幀數據
private:
void RGBToGray(BYTE *sRGB,BYTE *sGray,int nWidth, int nHeight);
void DiffImage(BYTE *sGray,BYTE *pGray,int nWidth, int nHeight,int nThreshold);
void GetMultiData(BYTE *sGray,int nWidth, int nHeight);
void GetBgImage();
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -