I have an image decorrelated and I need to obtain reshaping it 3 components: the first is achromatic and others 2 chromatic. So this decorrelated image(Mat) has to be reshaped as a matrix made as rows-by-cols-by-channels. But I can not use reshape function of OpenCv, because it s just for 2D matrix. How can I solve it? After this I need to pass the 3 different components to some function, so it s important I can use it