opencv 拼接图像
简单拼接
- left and right example
cv::Mat image(
std::max(leftImage.rows, rightImage.rows),
leftImage.cols + rightImage.cols,
leftImage.type());
leftImage.copyTo(cv::Mat(
image, cv::Rect{ 0, 0, leftImage.cols, leftImage.rows }));
rightImage.copyTo(cv::Mat(
image, cv::Rect{ leftImage.cols, 0, rightImage.cols, rightImage.rows }));
- top and bottom example
cv::Mat image(topImage);
image.push_back(bottomImage);