1 | initial version |
you can easily pick any ROI of your Mat, and set that to a certain value.
example (let's set the 1st column to 1):
Mat M = Mat::zeros(5,6,CV_8U);
M(Rect(0,0,1,M.rows)) = 1;
cerr << M;
[ 1, 0, 0, 0, 0, 0;
1, 0, 0, 0, 0, 0;
1, 0, 0, 0, 0, 0;
1, 0, 0, 0, 0, 0;
1, 0, 0, 0, 0, 0]