我想模糊图像,高斯模糊图像,但所有最终发生的事情,当我运行我的代码是图像打开没有模糊。任何人都可以帮我解决这个问题吗?opencv2 bluring图像
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
int main() {
//read the image
cv::Mat image= cv::imread("Space_Nebula.jpg");
cv::Mat result;
// create image window
cv::namedWindow("My Image");
//display image
cv::imshow("My Image", image);
//wait key
cv::waitKey(50000);
//blur image
cv::blur(image,result,cv::Size(5,5));
cv::imshow("My Image", image);
//smooth image
cv::GaussianBlur(image,result,cv::Size(5,5),1.5);
cv::imshow("My Image", image);
return 1;
}