0

I know how to add row or col in the right of the matrix:

cv::Mat row = cv::Mat::ones(1, 3, CV_64F);  // 3 cols, 1 row
m.push_back(row);                           // 3 cols, 5 rows

But I don't know how to add row or col in the left of the matrix.

I'm trying to make a map from a video. So is there any effective solution?

  • 1
    You can look for `cv::hconcat()` and `cv::vconcat()` – ZdaR Jul 18 '19 at 06:39
  • but should I rotate the matris and then use cv::hconcat() or cv::vconcat() ? –  Jul 18 '19 at 08:18
  • Completely depends upon your use case, as what type of matrices you want to concatenate? – ZdaR Jul 18 '19 at 10:04
  • I am studying on pictures from a video. also can you look this probem: https://stackoverflow.com/questions/57093644/copyto-and-range-problem-while-making-big-image-from-frames –  Jul 18 '19 at 11:42

0 Answers0