#include<iostream>
#include <opencv2/opencv.hpp> using namespace std;
using namespace cv; int test1()
{
Mat img1, img2,img3;
img2 = cv::Mat(, ,CV_8UC3);
img1 = imread("D://images//opencv测试图片//190.jpg");
if (img1.empty())
{
return -;
} int width1 = img1.rows;
int height1 = img1.cols; std::cout << "w:" << width1 << " h1:" << height1<<std::endl; double angle = 90.0; //角度
double scale = 1.0; //缩放系数 cv::transpose(img1, img2);
cv::flip(img2, img2, ); int width2 = img2.rows;
int height2 = img2.cols;
std::cout << "w:" << width2 << " h1:" << height2 << std::endl; imshow("win1", img1);
imshow("win2", img2); imwrite("D://images//opencv测试图片//img2019091902.jpg", img2); return ;
} int main()
{
test1(); waitKey();
return ;
}