opencv学习-图片读写

imread读取图片, imwrite写文件

#include 
#include "opencv2/opencv.hpp"

int main()
{
    cv::Mat img = cv::imread("C:\\Users\\Public\\Pictures\\Sample Pictures\\1.jpg");
    cv::imshow("img", img);
	while (true) {
		int c = cv::waitKey(500);
		std::cout << c << std::endl;
		if (c == 27)
			break;
	}
	cv::imwrite("C:\\Users\\Public\\Pictures\\Sample Pictures\\11.jpg", img);

	return 0;
}

你可能感兴趣的:(opencv,opencv,学习,计算机视觉)