以前,我使用 C API,现在我正在迁移到 C++ API opencv。下面是一些没有经过的事情。它表示 Mat 中的条件表达式存在某种错误。使用 C API 一切似乎都很好。
/// Initialize (C API)
vector<IplImage*> storeImg;
storeImg.pushback(...);
if( storeImg.at(i) == storeImg.at(0) )//no error
/// Initialize (C++ API)
vector<Mat> storeImg;
storeImg.pushback(...);
/// To use it
if( storeImg.at(i) == storeImg.at(0) )//error: conditional expression is illegal
有没有其他解决方法?