Multi-image averaging method for noise reduction

Source: Internet
Author: User

# # theory # #in the image captured by the camera, there is often a certain amount of noise. This noise is generally non-correlated in the spatial domain and is an additive noise. For images captured by a camera, it can be expressed as a non-noisy image and a composition of additive noise, namely:
$$\begin{equation} \label{imgeq}g (x, y)=f (x, y)+\eta (x, y)\end{equation}$$of which: $g (x, y)$ for capture image, $f (x, y)$ for noise- free images, $\eta (x, y) $. The process of noise removal is from known$g (x, y)$ to approximate get$f (x, y)$ for the process. For multiple images taken in the same scene, $f _{i} (x, y) $ is the same, while $\eta_{i} (x, y) $ is random and unrelated, the mean value of the K-image image of the same scene can be represented as follows $$\begin{equation} \label{ IMGAVRG}
\BAR{G} (x, y) =\frac{1}{k}\sum_{i=1}^k[f_{i} (x, y) +\eta_{i} (x, y)]=f (x, y) +\frac{1}{k}\sum_{i=1}^k\eta_{i} (x, y)\end{equation}
$$Because the noise is random and irrelevant, the expectation of its average image $$\begin{equation} \label{imgexp}
e\{\bar{g} (x, y) \}=f (x, y)\end{equation}
$$Variance of the average image$$\begin{equation} \label{imgvar}
\sigma_{\bar{g} (x, y)}^{2}=\frac{1}{k}\sigma_{\eta (x, y)}^{2}\end{equation}
$$That is, $$\begin{equation} \LABEL{IMGSD}
\SIGMA_{\BAR{G} (x, y)}=\frac{1}{\sqrt{k}}\sigma_{\eta (x, y)}\end{equation}
$$-$\eqref{Imgexp}$ We can find that the average value of multiple images in the same scene is a noise-free image, but there are some disturbances, and the standard deviation of these disturbances $\eqref{imgsd}$ determines the intensity of the noise. The essence of our image denoising is to reduce the standard deviation in the space domain. From type $\EQREF{IMGSD}It is not difficult to find out that noise can be reduced by increasing the $k$ value, that is, by increasing the number of average images. But at the same time we can find: $\sigma\varpropto\frac{1}{\sqrt{k}}$,$\frac{\partial\sigma}{\partial k}=-\frac{1}{2\sqrt{k^3}}$, with $k$ The increase of the value, the change of $\sigma$ is getting smaller, the effect of increasing the number of images is very small when using average method to denoise.
# # experiment # ## # # Purpose # # #1.    Verify that multi-image averaging can be de-noising in the same scenario. 2.    with the increase of the number of images, the noise of the image becomes smaller. # # # Data Set # # #179 photos of the same scene, collected in a short time. Here is one of the pictures
Its local details:
You can see that the noise on the image is much more. # # # program Design # # #程序的处理过程为:*reading Images* Averaging*Display Image
Program Source code:matlab
"' matlab% get image file Namesdir = ' IMGs '; imgfiles = Dir ([dir, '/*.jpg ']);  [N, c]= size (imgfiles); % get the image sizeimg = im2double (Imread ([DIR, '/', Imgfiles (1). name]); figure (1); Imshow (IMG); IMG = img/n;% Calculate the averagefor m = 2:n img = img + im2double (imread ([DIR, '/', Imgfiles (m). Name])/N;ENDFI Gure (2); Imshow (IMG);
C + + (OpenCV2.4) "Cpp#include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <sstream> #include <exception> #include <iostream>  void denoise () {    const int N = 179;     Cv::mat avrg_img;    for (int i = 0; i < N; i++) {        Std::ostringstream oss;         oss << "imgs/img (" << i+1 << "). jpg";       & nbsp Cv::mat image = Cv::imread (Oss.str ());       //Convert to double         Image.convertto (image, cv_32f, 1.0/255.0);         if (i = = 0) {            Cv::namedwindow ("Noisy image") ;            Cv::imshow ("NOisy image ", image);            avrg_img = image/n;        }        else             avrg_img + = image/n;   }    CV:: Namedwindow ("denoised image");    cv::imshow ("denoised image", avrg_img);    Avrg_ Img.convertto (avrg_img, CV_8UC3, 255.0);    cv::imwrite ("Denoised.jpg", avrg_img);}  int Main () {    try{        denoise ();   }     catch (std::exception &e) {        Std::cerr << E.what () << std::endl;   }    cv::waitkey ();    return 0;} The "# # # test # # #对179张图片进行测试, the results are as follows: Comparison of the original: it can be seen that the noise is significantly reduced, thus verifying the feasibility of multi-image averaging method to de-noising. Change the average number of pictures, $K $ take ${2,3 ... 10}$, you can get a series of images, as shown in the following GIF: As you can see, from the original to the $k=2$, the noise reduction is significant, but from $k=9$ to $k=10$, the noise changes less, validating the previous mathematical model. # # Reference # #
[1] Gonzalez. Digital image processing [M]. Vancouver translation. Beijing: Electronic industry press. 2011.6

From for notes (Wiz)

Multi-image averaging method for noise reduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.