#include<opencv2/opencv.hpp>#include<iostream>usingnamespace std;usingnamespace cv;
Mat bg;//背景图 大小要与 视频流 大小一致
Mat Repalce_and_Belnd(Mat& frame, Mat& mask);intmain(int argc,char** argv){
VideoCapture capture;
capture.open("../path.mp4");if(!capture.isOpened()){
printf("could not find the video file...\n");return-1;}
bg =imread("../background.jpg");if(bg.empty()){
cout <<"could not load image..."<< endl;return-1;}
Mat frame,hsv,mask;while(capture.read(frame))