// 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;
}