Have a look at here
OutputArray can be the ROI of the original full image.
void cv::Mat::copyTo(OutputArray m, InputArray mask ) const
Have a look at here
OutputArray can be the ROI of the original full image.
void cv::Mat::copyTo(OutputArray m, InputArray mask ) const