利用从摄像头输出的图像,对运动物体可以进行识别并报警
#include "stdio.h"
#include "time.h"
#include "Dos.h"
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
//#include "mmsystem.h"
#include "windows.h"
#pragma comment(lib, "winmm.lib")
int main( int argc, char** argv )
{
//声明IplImage指针
IplImage* pFrame = NULL;
IplImage* pFrImg = NULL;
IplImage* pBkImg = NULL;
CvMat* pFrameMat = NULL;
CvMat* pFrMat = NULL;
CvMat* pBkMat = NULL;
CvCapture* pCapture = NULL;
int nFrmNum = 0;
long int WhiteNum=0;
long int TotalNum=0;
time_t timeBegin, timeEnd;
int timeuse;
//创建窗口
cvNamedWindow("video", 1);
cvNamedWindow("background",1);
cvNamedWindow(&#