Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think transpose is that what you need.

#include <opencv2/opencv.hpp>

using namespace cv;

Mat image = imread("your/path/to/image.png", IMREAD_ANY);
// here comes the transpose function
Mat imageSwapewd = image.t();

When the direction is wrong you can use cv::flip instead