opencv std::vector<cv:Mat>
Mat is some kind of smart pointer for the pixels
Mat a=b will have shared pixels for a and b. similar situation for push_back()
if you need a 'deep copy', use Mat::clone()
所以在初始化含Mat的容器时要用以下代码:
vector<cv::Mat> fims;
for (int numMat = 0; numMat < 6; numMat++) {
cv::Mat fim(m_hSample, m_wSample, CV_32FC3);
fims.push_back(fim);
}