AMCoded AMCoded - 1 year ago 120
C++ Question

OpenCV Add columns to a matrix

in OpenCV 2 and later there is method

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.

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