Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize Gaussian filtering by python OpenCV

Shulou Source: shulou.com Published: 2022-06-03 07:42:00 10月04日 Update

Xiaobian to share with you how python OpenCV to achieve Gaussian filtering, I believe most people still do not know how to share this article for your reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!

1. Gaussian filtering

   Gaussian filter is a linear smoothing filter, which is suitable for eliminating Gaussian noise and widely used in image processing. [1]Generally speaking, Gaussian filtering is the process of weighted averaging of the whole image. The value of each pixel is obtained by weighted averaging of itself and other pixel values in its neighborhood. The specific operation of Gaussian filtering is: scan each pixel in the image with a template (or convolution, mask), and replace the value of the center pixel of the template with the weighted average gray value of the pixels in the neighborhood determined by the template.

C++#include #include using namespace cv;using namespace std;int main(){ Mat img = imread("gauss_noise.png"); if (img.empty()) { cout

Tags: Gaussian pixel image noise template article result code content process neighborhood popular smooth not so much representative noise reduction function convolution name image processing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei OPPO Reno Docker MySQL vpn