My original python code reads an image and transpose it using:
image = cv2.imread(image_name)
image = numpy.transpose(image, (2, 0, 1))
So the original 160x160x3 BGR image would be 3x160x160.
I'd like to implement this functionality in c++ but have no idea how to do transpose on cv::Mat object.
Any help?