From f36dad7c9ce80672ee85ad8fa7468a9653607092 Mon Sep 17 00:00:00 2001 From: yoyoyo-yo Date: Tue, 22 Oct 2019 22:45:06 +0900 Subject: [PATCH] add --- Question_01_10/answers_cpp/answer_9.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Question_01_10/answers_cpp/answer_9.cpp b/Question_01_10/answers_cpp/answer_9.cpp index a43ecc94..246b5f32 100644 --- a/Question_01_10/answers_cpp/answer_9.cpp +++ b/Question_01_10/answers_cpp/answer_9.cpp @@ -25,7 +25,7 @@ cv::Mat gaussian_filter(cv::Mat img, double sigma, int kernel_size){ for (int x = 0; x < kernel_size; x++){ _y = y - pad; _x = x - pad; - kernel[y][x] = 1 / (sigma * sqrt(2 * M_PI)) * exp( - (_x * _x + _y * _y) / (2 * sigma * sigma)); + kernel[y][x] = 1 / (2 * M_PI * sigma * sigma) * exp( - (_x * _x + _y * _y) / (2 * sigma * sigma)); kernel_sum += kernel[y][x]; } }