#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
using namespace cv;
using namespace std;
void PrintMs(const char *text = "")
{
static long long last = 0;
long long cur = getTickCount();
if (last == 0)
{
last = cur;
return;
}
long long ms = 0;
ms = ((double)(cur - last) / getTickFrequency()) * 1000;
if (*text != 0)
{
printf("%s = %dms\n", text,ms);
}
last = getTickCount();
}
int main(int argc, char *argv[])
{
Mat img = imread("1.png");
Mat rot;
Mat fl;
cv::rotate(img, rot, ROTATE_90_CLOCKWISE);
cv::flip(img, fl, 1);
namedWindow("rot");
imshow("rot", rot);
namedWindow("fl");
imshow("fl", fl);
waitKey(0);
return 0;
}
Opencv图像旋转
最新推荐文章于 2024-04-26 21:00:33 发布