OPencv 将一张图片插入另一张图片的指定区域
作者:互联网
Mat c=imread("car.png");//图片放工程底下
Size c_dsize = Size(200, 350);//自适应大小
Mat dst(c_dsize, c.type());//模板
resize(c,dst,dst.size());//大小
Mat aaa = dst(Rect(Point(62,110), Size(70, 140)));
Mat allresult=resule+result_left+result_r+result_down;
cv::Rect roi_rect = cv::Rect(62, 110, aaa.cols, aaa.rows);
aaa.copyTo(allresult(roi_rect));
cv::imshow("result", allresult);
标签:一张,aaa,Mat,dst,OPencv,result,cv,Rect,图片 来源: https://www.cnblogs.com/hhy-2216/p/15966882.html