1 | initial version |
images.push_back(imgl);
is the same as cv::Mat image = imgl;
and only copies the Mat
header not the data.
So you are pointing both vector elements to the same data. Instead you should do a deep copy with images.push_back(imgl.clone());
for example.