C++ cv::Mat1f逐行迭代器

C++ cv::Mat1f逐行迭代器,c++,opencv,C++,Opencv,我有以下代码: std::vector<cv::Mat1f> mat; for(int i=0; i<10; i++) mat.push_back(cv::Mat1f::zeros(1,10)); //fill mat somehow //sum mat row by row (in this case with itself) std::transform(mat.begin(), mat.end(), mat.begin(), mat.begin(), std::p

我有以下代码:

std::vector<cv::Mat1f> mat;
for(int i=0; i<10; i++)
    mat.push_back(cv::Mat1f::zeros(1,10));
//fill mat somehow
//sum mat row by row (in this case with itself)
std::transform(mat.begin(), mat.end(), mat.begin(), mat.begin(), std::plus<cv::Mat1f>());
std::向量矩阵;

对于(int i=0;我不明白为什么你需要向量…你就不能有一个10行的矩阵吗?因为。我正在尝试并行化该代码,并且
omp declare reduction
需要
transofrm
,它需要“逐行”迭代器。