Copy an cv::Mat inside a ROI of another one

前端 未结 3 1073
暖寄归人
暖寄归人 2020-11-27 14:58

I need to copy a cv::Mat image (source) to an ROI of another (Destination) cv::Mat image.

I found this reference, but it seems that it does

3条回答
  •  北荒
    北荒 (楼主)
    2020-11-27 15:32

    In addition or correction to above answers, if you want to copy a smaller region of open Mat to another Mat, you should do:

    src(Rect(left,top,width, height)).copyTo(dst);
    

提交回复
热议问题