1 | initial version |
You can try :
Mat a(6, 6, CV_8UC3, Scalar(1, 64, 192));
vector<vector<uchar>> v(a.rows);
for (int i = 0; i < a.rows; i++)
{
a.row(i).reshape(1,1).copyTo(v[i]);
}
for (int i = 0; i < a.rows; i++)
{
for (auto j : v[i])
cout << int(j) << "\t";
cout << "\n";
}