I have tried reading around to see if this question has been answered before, but haven’t found anything specific.
In python I could easily convert my image numpy array to cube using image.swapaxes(1, 2).swapaxes(0, 1)
or simply using image.transpose((2,0,1)) before converting to tensor for making inference.
Please is there any quick way of doing this assuming I have read in an image with opencv in the c++ front-end?
Any hint or example will be appreciated.