1 | initial version |
you need a fresh Mat instance for each element of your array /vector, like:
vector<Mat> im {
Mat(r,c,CV_8UC3),
Mat(r,c,CV_8UC3),
Mat(r,c,CV_8UC3)
};
please do NOT
try like this:
vector<Mat> im(3, Mat(r,c,16));
(because all 3 Mat instances will point to the same Mat.data)