C/C++ OpenCV高斯滤波
生活随笔
收集整理的這篇文章主要介紹了
C/C++ OpenCV高斯滤波
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
高斯濾波GaussianBlur函數
void GaussianBlur(
InputArray src,
OutputArray dst,
Size ksize,
double sigmax,
double sinmay,
int borderTYpe=BORDER_DEFAULT
)
下面是代碼
#include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp>using namespace cv;int main() {//載入圖像Mat image = imread("1.jpg");//創建窗口namedWindow("高斯濾波原圖");namedWindow("高斯濾波效果圖");imshow("高斯濾波原圖", image);//進行濾波Mat out;GaussianBlur(image, out, Size(7, 7), 0, 0);imshow("高斯濾波效果圖", out);waitKey(0);return 0; }運行結果:
總結
以上是生活随笔為你收集整理的C/C++ OpenCV高斯滤波的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C/C++轻松破解别人程序的窗口标题
- 下一篇: C/C++ OpenCV之Sobel边缘