Cv :: Mat1f bitwise iterator

I have this code:

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

Now I would like to use the material std::transofrm(...), using cv::Mat1finstead std::vector<cv::Mat1f>, but for this I need an iterator in turn. How can i do this? Do I need to create a new class that inherits cv::Mat1fand defines a new iterator?

0
source share

Source: https://habr.com/ru/post/1673833/


All Articles