运动物体检测(一)
1.运动物体检测——背景减法
2.运动物体检测——帧差法
先上ppt:
代码:1.运动物体检测——背景减法
///运动物体检测——背景减法
#include "opencv2/opencv.hpp"
using namespace cv;
#include <iostream>
using namespace std;
//运动物体检测函数声明
Mat MoveDetect(Mat background,Mat frame);
int main()
{
VideoCapture video("bike.avi");//定义VideoCapture类video
if (!video.i