码迷,mamicode.com
首页 > 其他好文 > 详细

OpenCv ROI操作

时间:2015-12-02 12:26:17      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:

 

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

 

OpenCv ROI操作

标签:

原文地址:http://www.cnblogs.com/adong7639/p/5012209.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!