#include <opencv2/opencv.hpp>
#include<opencv2/core/core.hpp>
#include"opencv2/highgui/highgui.hpp"
#include<opencv2/imgproc/imgproc.hpp>
#include<iostream>
#include<time.h>
using namespace std;
using namespace cv;
int main()
{
Mat image = imread("C:/Users/离子键/source/repos/Project8/1.jpg");
namedWindow("均值滤波【原图】");
namedWindow("均值滤波【效果图】");
imshow("均值滤波【原图】",image);
Mat out;
blur(image,out,Size(7,7));
imshow("均值滤波【效果图】", out);
waitKey(0);
}
运行结果如图:
毛星云opencv原版介绍如下: