<opencv>第四课 高斯模糊

1
void cv::GaussianBlur(InputArray src, OutputArray dst, Size ksize, double sigmaX, doube sigmaY = 0, int borderType = BORDER_DEFAULT)

使用高斯滤波器模糊图像。该函数将源图像与指定的高斯核进行卷积。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main()
{
    string path = "../lesson1_pictureRead/img1.jpg";
    Mat img = imread(path);
    Mat imgBlur;
    GaussianBlur(img, imgBlur, Size(3,3),3,1); //高斯模糊
    imshow("Image", img);
    imshow("ImageBlur", imgBlur);
    waitKey(0);
    return 0;
}


“觉得不错的话,给点打赏吧 ୧(๑•̀⌄•́๑)૭”

微信二维码

微信支付

支付宝二维码

支付宝支付

<opencv>第四课 高斯模糊
https://hermione20.github.io/2024/10/14/第4课 高斯模糊/
作者
TC
发布于
2024年10月14日
许可协议