摘要: OpenCV 基础,常用方法 导入头文件 #include <opencv2/opencv.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> using namespace cv; u 阅读全文
posted @ 2019-08-27 21:02 魔仙小丽丽 阅读(992) 评论(0) 推荐(0) 编辑
摘要: 1.求1-100之间的素数 int j; int i; for (i=2; i = i) { cout >m; cout > n; int i, g; for (i = 1; i > arr[i]; } //cout arr[j + 1]) { temp = arr[j]; ... 阅读全文
posted @ 2019-08-27 19:32 魔仙小丽丽 阅读(574) 评论(0) 推荐(0) 编辑
摘要: //1. 调用函数实现判定用户输入的正整数是否为“回文数“,所谓“回文数”是指正读反读都相同的数。 (25分) bool hw(string s) { for (int i = 0; i > s; cout> s; for (int i = 0; i > s; getline(cin,s); int count = 1; for (int ... 阅读全文
posted @ 2019-08-27 19:29 魔仙小丽丽 阅读(625) 评论(2) 推荐(0) 编辑
摘要: 一、读取保存图片 Mat scrImage = imread("1.jpg"); //显示图像 imshow("原图", scrImage); //窗口等待 waitKey(2000); //窗口销毁 destroyAllWindows(); //图片另存为 //imwrite("D://"); return 0; 二、图片的腐蚀操作 Mat srcImage = imread("1.jpg"); 阅读全文
posted @ 2019-08-27 19:26 魔仙小丽丽 阅读(802) 评论(0) 推荐(0) 编辑