for (size_t i = 1; i < count + 1; i++) {
Mat img = vFrames[i - 1].Image1;
Mat half1(mFinalImage, cv::Rect(-final_vector[i - 1].x + minx + abs(minx), -final_vector[i - 1].y - miny + abs(maxy), img.cols, img.rows));
img.copyTo(half1);
}
Mat half1(mFinalImage, cv::Rect(-final_vector[i - 1].x + minx + abs(minx), -final_vector[i - 1].y - miny + abs(maxy), img.cols, img.rows)); in line
Assertion failed (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in cv::Mat::Mat,
I often get such an error, what is the reason and solution