pub fn vconcat2(
src1: &impl ToInputArray,
src2: &impl ToInputArray,
dst: &mut impl ToOutputArray,
) -> Result<()>Expand description
Applies vertical concatenation to given matrices.
The function vertically concatenates two or more cv::Mat matrices (with the same number of cols).
cv::Mat matArray[] = { cv::Mat(1, 4, CV_8UC1, cv::Scalar(1)),
cv::Mat(1, 4, CV_8UC1, cv::Scalar(2)),
cv::Mat(1, 4, CV_8UC1, cv::Scalar(3)),};
cv::Mat out;
cv::vconcat( matArray, 3, out );
//out:
//[1, 1, 1, 1;
// 2, 2, 2, 2;
// 3, 3, 3, 3]§Parameters
- src: input array or vector of matrices. all of the matrices must have the same number of cols and the same depth.
- nsrc: number of matrices in src.
- dst: output array. It has the same number of cols and depth as the src, and the sum of rows of the src.
§See also
cv::hconcat(const Mat*, size_t, OutputArray), cv::hconcat(InputArrayOfArrays, OutputArray) and cv::hconcat(InputArray, InputArray, OutputArray)
§Overloaded parameters
cv::Mat_<float> A = (cv::Mat_<float>(3, 2) << 1, 7,
2, 8,
3, 9);
cv::Mat_<float> B = (cv::Mat_<float>(3, 2) << 4, 10,
5, 11,
6, 12);
cv::Mat C;
cv::vconcat(A, B, C);
//C:
//[1, 7;
// 2, 8;
// 3, 9;
// 4, 10;
// 5, 11;
// 6, 12]- src1: first input array to be considered for vertical concatenation.
- src2: second input array to be considered for vertical concatenation.
- dst: output array. It has the same number of cols and depth as the src1 and src2, and the sum of rows of the src1 and src2.