// opencv3_blur.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include <iostream>
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
//debug下在lib文件的名称后加d,release下不加d。
int main()
{
Mat img = imread("../res/test.jpg");
if (img.data == NULL)
{
std::cout << "image read is null" << std::endl;
return -10;
}
/*namedWindow("【原图】", WINDOW_AUTOSIZE);*/
imshow("【原图】", img);
//均值滤波,模糊图像
Mat dstimg;
blur(img, dstimg, Size(10, 10));
imshow("【均值滤波效果图】", dstimg);
waitKey(0);
return 0;
}