这个操作很麻烦。我打不过去。我错过了什么?
vector<Mat> blobC;
for(unsigned int i = 0; i < blobCFinal.size(); i++)
{
blobC.at(i) = blobCFinal.at(i);
}
,
vector<IplImage*> blobCFinal;
如果我没弄错的话,通常转换正常类型的方法是这样的,
IplImage* blobCFinal;
Mat blobC(blobCFinal);
答:感谢@rotating_image,可能这将工作
vector<Mat> blobC;
for(unsigned int i = 0; i < blobCFinal.size(); i++)
{
Mat dummy = Mat(blobCFinal[i]);
blobC.push_back(dummy);
}
试试这个…
vector<Mat> blobC;
vector<IplImage*> blobCFinal;
//some processing
for(unsigned int i = 0; i < blobCFinal.size(); i++)
{
Mat dummy = Mat(blobCFinal[i]);
blobC[i] = dummy.clone();
}