RegionSourceBody(const image &bigImg, const image &smallImg) { auto hb = bigImg.size(); auto wb = bigImg.front().size(); auto hs = smallImg.size(); auto ws = smallImg.front().size(); cout << "region big(" << hb << "," << wb << ") small(" << hs << "," << ws << ")" << endl; auto h = hb - hs; auto w = wb - ws; for (auto i = 0; i < h; ++i) { for (auto j = 0; j < w; ++j) { Region region(i, j, i + hs - 1, j + ws - 1, &bigImg, &smallImg); regions.push_back(region); } } size = regions.size(); cout << "Amount of tasks: " << size << endl; }