#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui_c.h>
int main() {
cv::namedWindow("Before", CV_WINDOW_AUTOSIZE);
// Load the source image
cv::Mat src = cv::imread("HorseSports.jpg", 1);
// Create a destination Mat object
cv::Mat dst;
// display the source image
imshow("Before", src);
for (int i = 1; i<11; i = i + 2)
{
// smooth the image in the "src" and save it to "dst"
// blur(src, dst, Size(i,i));
// Gaussian smoothing
cv::GaussianBlur(src, dst, cv::Size(i, i), 0, 0);
//show the blurred image with the text
imshow("Gaussian filter", dst);
std::stringstream ss; //以下4行新規
ss << "temp" << i << ".jpg";
std::string s = ss.str();
cv::imwrite(s, dst);
//wait for 5 seconds
cv::waitKey(5000);
}
}