AMCoded AMCoded - 1 year ago 94
C++ Question

OpenCV Add columns to a matrix

in OpenCV 2 and later there is method

Mat::resize
that let's you add any number of rows with the default value to your matrix is there any equivalent method for the column. and if not what is the most efficient way to do this.
Thanks

Answer Source

Use cv::hconcat:

Mat mat;
Mat cols;

cv::hconcat(mat, cols, mat);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download