opencv学习-图片读写

imread读取图片, imwrite写文件

#include <iostream>
#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;
}

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇
下一篇>>