[][src]Function opencv::core::vconcat

pub fn vconcat(
    src: &dyn ToInputArray,
    dst: &mut dyn ToOutputArray
) -> Result<()>

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

  std::vector<cv::Mat> matrices = { 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( matrices, out );
  //out:
  //[1,   1,   1,   1;
  // 2,   2,   2,   2;
  // 3,   3,   3,   3]
  • src: input array or vector of matrices. all of the matrices must have the same number of cols and the same depth
  • dst: output array. It has the same number of cols and depth as the src, and the sum of rows of the src. same depth.