OpenCv ROI操作

    Mat img, dst;
    Rect imgroi(0, 0, img.cols, img.rows);//小图像img需要复制到大图的像素区域rect
    Rect dstroi(0, 0, img.cols, img.rows);//大图像dst中接收的区域rect
    Mat  dstregion = dst(dstroi);//获取大图像dst接收区域的像素应用
    img(imgroi).convertTo(dstregion, dstregion.type(), 1, 0);//将图像img的该区域复制到大图像接收区域
原文地址:https://www.cnblogs.com/adong7639/p/5012209.html