how can i reshape a Mat 2D to vector<vector<Mat>>
i would like to convert a Mat whose dimensions are [2000][256] and i want to convert this to a vector<vector<mat>> with dimensions [256][20][10][10]. In matlab it is posible to do reshape(Mat2d, 10, 10, 20, 256), i would like to do the same
So you want a
vector<vector<vector<uint8>>>
containing 10 continuous elements? I don't think that is usefull but you could write a function for this purpose. Do you know how to access the pixels in a mat?