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的该区域复制到大图像接收区域

 

posted on 2015-12-02 10:30  Maddock  阅读(680)  评论(0)    收藏  举报

导航