当前位置:网站首页>[image denoising] salt and pepper noise image denoising based on Gaussian filter, mean filter, median filter and bilateral filter with matlab code attached

[image denoising] salt and pepper noise image denoising based on Gaussian filter, mean filter, median filter and bilateral filter with matlab code attached

2022-06-12 06:48:00 Matlab scientific research studio

1 brief introduction

Image is an important source of information in life , Processing images helps to understand the basic information of information . But the image itself may have some disturbed information or noise . Based on Gaussian filtering 、 Mean filtering 、 The digital image processing technology of median filter and bilateral filter algorithm is used to eliminate the image noise . Through theoretical simulation and actual image processing , The two algorithms are compared and simulated, and the corresponding conclusions are drawn . It provides data reference and basis for the selection of noise elimination methods and the improvement of practical work in the future .

Image is the first perspective for human beings to understand the world , We can get more real information and intuitive results through images . But actually , In the process of generation and transmission, the signal will inevitably mix with some noise . therefore , When receiving an image signal , Eliminating or reducing noise has become an important method to obtain high-definition images . Before denoising the image , We need to model noisy images , Get the original information of noise . Because noise generation is inevitable , therefore , You can only choose to eliminate by corresponding methods , This is also the research significance of image noise elimination .

With the rapid development of computer application technology , The information that human contact is no longer a simple voice signal . More image signals , The more digital information , There will be more interference and noise . With the development of society , People's requirements for image quality of receiving external information sources are increasing , This also puts forward higher requirements for noise removal technology . With the deepening of people's research , A lot about image processing technology is improving , Image denoising technology is becoming more and more perfect . Nowadays, image denoising has been a relatively visual research topic , Its scope is very wide , It is of great help to the military and medical fields . therefore , Further research on image denoising from the computer level has important practical significance ​.

On the whole , Gaussian filter is a kind of linear smoothing filter , It is very effective in dealing with systematic Gaussian noise , It mainly deals with the weighted average of the digital signal corresponding to the image . such as , The position result of any noise , Use the weighted average of the surrounding areas , The noise points can disappear in the surrounding weighted average results , In the process of concrete implementation , It mainly uses the weighted average function to weight the results , after , Overwrite the special value with the average value .

Noise removal process , In fact, it is the implementation process of the filter . Gaussian filter is to filter Gaussian noise , So we can get an image with good signal-to-noise ratio , The higher the SNR is , The more distortion free the result is . For an image , If the noise persists , It may cause poor noise transmission . The process of Gaussian filtering is to smooth the signal first . And then , Remove the noise accordingly . The purpose of Gaussian filter is to construct a filter , Carry out second-order filtration , And carry out the corresponding energy conversion process , In the frequency domain , Energy is a relatively direct manifestation . We often can not directly use the ideal filter to process the signal , Because it is very likely that the signal will ring . The advantage of Gaussian filter is that its system function is relatively reliable , It can effectively smooth the system noise , Avoid undesirable ringing .

Through the analysis and research of bilateral filtering , The author thinks , The algorithms of bilateral filtering and Gaussian filtering are different . Different from Gaussian filtering , Bilateral filtering is a nonlinear digital processing method for image signals , Bilateral filtering can cover Gaussian filtering algorithm , It also takes into account the dual effects of gray point value and burr removal . But for images , It is better to choose the combination of Gaussian filter and bilateral filter for denoising . Specifically speaking from the algorithm , Bilateral filtering is transformed from Gaussian filtering , Double convolution processing for Gaussian filtering function , Optimize the filter weight coefficient , The coefficients of the filter weights are multiplied by the convolution results in the frequency domain of the image , Thus, the effect of removing burr on the basis of removing gray is obtained , It gives full play to the advantages of Gaussian filtering noise , At the same time, the bilateral smoothing optimization effect is also obtained .

In theory , The result of bilateral filtering is better , The smoothness of the image is good , Practical . Let's explain the weight enhancement in the bilateral filtering process , Generally speaking, the weighting coefficients of bilateral filtering are a nonlinear combination of Gaussian filtering and convoluted result coefficients , It mainly uses the coefficient memory convolution calculation of spatial image approximation function and brightness approximation function . For the former , As the calculation step changes , The mathematical distance between the pixel point obtained from the image and the back center point will become smaller , If you increase the clarity of the image , Then the distance becomes smaller . in other words , The higher the pixel, the higher the image , During processing , The bilateral filter will be transformed into the corresponding low-pass filter , The edge of the image can be better protected . Generally speaking , The results of bilateral filtering are affected by 3 The influence of two parameters , They are the half width of the filter  N、 Parameters δs and δr. For general bilateral filtering analysis , In the filtering process, the proximity factor and the brightness change factor are both violent . We are in the process of image processing , You can't just keep high-frequency or low-frequency signals , therefore , Use of bilateral filtering , It can protect the image processing with wide frequency domain , The realization of its effect is mainly accomplished by the function of bilateral filtering . In a bilateral filter , The output result of pixels will be generated . According to previous studies , Bilateral filtering has strong nonlinear processing ability 、 The local processing effect is good and the calculation process does not have the characteristics of iteration . However, the disadvantage of bilateral filtering is that it is easy to process the signal of its own image , This requires the cooperation of Gaussian filtering . In other words , If gray processing or other processing methods are not used in the early stage , Cover the rough edges , Then the effect of bilateral filtering may not be ideal , The mathematical model of bilateral filtering is given below .​

2 Part of the code

%%%2020/04/07%%% Contrast Gaussian filtering 、 Mean filtering 、 median filtering 、 Application of bilateral filtering in image denoising close allclear alluyclcSNRBilateral = SNR(Pic,ResultofBilateral)%%  result figure(1)subplot(121); imshow(graybefore); title(' Before adding noise ');subplot(122); imshow(gray);    title(' After noise ');figure(2)subplot(121); imshow(gray); title(' original image ');subplot(122); imshow(ResultofGaussian);    title(' Gaussian filtered image ');figure(3);subplot(121); imshow(gray); title(' original image ');subplot(122); imshow(ResultofAverage);  title(' Mean filtered image ');figure(4);subplot(121); imshow(gray); title(' original image ');subplot(122); imshow(ResultofMedian);    title(' Median filtered image ');figure(5);subplot(121); imshow(gray); title(' original image ');subplot(122); imshow(ResultofBilateral);    title(' Bilateral filtered image ');figure(6)subplot(3,2,1); imshow(Img); title(' original image ');subplot(3,2,2); imshow(gray);    title(' After noise ');subplot(3,2,3); imshow(ResultofGaussian); title(' Gaussian filtered image ');subplot(3,2,4); imshow(ResultofAverage); title(' Mean filtered image ');subplot(3,2,5); imshow(ResultofMedian); title(' Median filtered image ');subplot(3,2,6); imshow(ResultofBilateral);  title(' Bilateral filtered image ');

3 Simulation results

4 reference

[1] Pan Liangjing . Digital image denoising algorithm based on Gaussian filter and bilateral filter [J]. Journal of Shangqiu Vocational and technical college , 2020, 19(1):4.

[2] Yuanxinxing . Research on high density salt and pepper noise image denoising algorithm based on median filter [D]. Hubei University of technology .

About bloggers : Good at intelligent optimization algorithms 、 Neural networks predict 、 signal processing 、 Cellular automata 、 The image processing 、 Path planning 、 UAV and other fields Matlab Simulation , relevant matlab Code problems can be exchanged by private letter .

Some theories cite network literature , If there is infringement, contact the blogger to delete .

原网站

版权声明
本文为[Matlab scientific research studio]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206120641165150.html