我有一个根据以下代码动态更改的矩阵;
for( It=all_frames.begin(); It != all_frames.end(); ++It)
{
ItTemp = *It;
subtract(ItTemp, Base, NewData);
cout << "The size of the new data for ";
cout << " is \n" << NewData.rows << "x" << NewData.cols << endl;
cout << "The New Data is: \n" << NewData << endl << endl;
NewData_Vector.push_back(NewData.clone());
}
我想要做的是确定 cv::Mat NewData 是零矩阵的帧。我尝试使用 cv::compare() 函数和简单的运算符(即 NewData == NoData)将它与大小相同的零矩阵进行比较,但我什至无法编译程序。
是否有一种简单的方法可以确定 cv::Mat 何时填充零?