Hi,
I noticed that the default memory order is HWC which means that the offset is computed as offset = h * im.rows * im.elemSize() + w * im.elemSize() + c'. However, I need to change the layout toCHWmode, which means that the offset of(h, w, c)should beoffset = c * im.rows * im.cols + h * im.cols + w`.
Is there any built-in method to do this ? If not, is there any c++11/14 built-in method to do this? Or what is the fastest way to do this ?