(12)高斯和均值模糊放到一起
基本的样子展示
=============================
=========================================
代码展示
==========================================
1 #include<iostream> 2 #include<opencv.hpp> 3 4 using namespace std; 5 using namespace cv; 6 7 int main() 8 { 9 10 11 Mat sou, dst; 12 sou = imread("C:\\Users\\32829\\Desktop\\aa.jpg"); 13 if (sou.empty()) 14 { 15 cout << "图像载入失败" << endl; 16 } 17 namedWindow("old"); 18 imshow("old", sou); 19 20 Mat dst1; 21 //进行模糊的函数,那个Size中的两个值,表示,你在x和y方向的模糊程度的大小。Point是默认的,一般不修改 22 blur(sou, dst, Size(4, 4), Point(-1, -1)); 23 GaussianBlur(sou, dst1, Size(3, 3), 11, 11); 24 namedWindow("均值模糊"); 25 imshow("均值模糊", dst1); 26 namedWindow("高斯模糊"); 27 imshow("高斯模糊", dst1); 28 29 waitKey(0); 30 return 1; 31 }