基于hsv颜色空间的实时背景替换:
#include
using namespace cv;
Mat replace_and_blend(Mat &frame, Mat&mask);
Mat background,frame, hsv, mask,result;
int main(int arc, char** argv) {
background = imread("2.jpg");
namedWindow("input", CV_WINDOW_AUTOSIZE);
imshow("src", background);
VideoCap
1