Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在处理处于中间阶段的视频处理项目,需要用另一个图像的 ROI(相同尺寸)替换某些图像的 ROI。是否有任何内置功能?
您可以用来Mat::copyTo在 Mat 实例之间传输内容:
Mat::copyTo
cv::Mat image1, image2; cv::Rect roi1(0, 0, 100, 100); cv::Rect roi2(50, 50, 150, 150); cv::Mat(image2, roi2).copyTo(cv::Mat(image1, roi1));