0

我对这个操作感到不安。我无法通过它。我在哪里失踪?

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);

Ans:感谢@rotating_image,这可能会起作用

vector<Mat> blobC;
    for(unsigned int i = 0; i < blobCFinal.size(); i++)
    {
        Mat dummy = Mat(blobCFinal[i]);
        blobC.push_back(dummy);
    }
4

1 回答 1

1

试试这个...

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();
}
于 2013-01-19T07:26:28.213 回答