opencv实现图片旋转

ROTATE_90_CLOCKWISE = 0, //! /ROTATE_180 = 1, //! ROTATE_90_COUNTERCLOCKWISE = 2, //Rotate 270 degrees clockwise

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

using namespace std;
using namespace cv;


//	 ROTATE_90_CLOCKWISE = 0, //!
//	    ROTATE_180 = 1, //!
//	    ROTATE_90_COUNTERCLOCKWISE = 2, /

int main() {
	Mat img = imread("in.jpg", IMREAD_UNCHANGED);
	rotate(img,img2, ROTATE_90_CLOCKWISE);
	imwrite("out.jpg", img2);
	return 0;
}


你可能感兴趣的:(opencv,opencv,人工智能)