I'd like to do something like:
Mat foo(N, N, CV_MAKETYPE(CV_8U, 1), data);
typedef Matx<uint8_t, 4, 4> block;
auto iblock = foo.begin<block>();
auto done = foo.end<block>();
while (iblock != done)
{
Mat blk(*iblock);
// process my 4x4 block
}
I think this should be possible, but not sure how.