今天的目标是用OpenCV实现对运动目标的检测,这里选用三帧帧差法。代码如下:
#include <opencv2>
#include <cv>
#include <highgui>
#include <stdio>
#include <ctype>
double Threshold_index=0;
const int CONTOUR_MAX_AERA = 200;
void trackbar(int pos)
{
Threshold_index=(double)pos;
}
int main(int argc, char* argv[])
{
C