1
$\begingroup$
I = imread('us-currency.png');
mean = 0.5;
variance = 0.5;
J = imnoise(I,'gaussian', mean, variance);
imshow(J);

What are the effects of mean and variance on that image?

  • Does mean increases the brightness?

  • Does variance increases the amount of noise?

Input

enter image description here

Output

enter image description here

$\endgroup$
2

2 Answers 2

6
$\begingroup$

Does mean increases the brightness?

As you add a constant mean to each pixels of the image you will get an image that has an overall higher average image pixel value. Since images are generally encoded with the maximum pixel value being white, you would get an image which is closer to white, and hence perceptually appears brighter.

Does variance increases the amount of noise?

That one deserve a little bit more background. Indeed, quoting from Wikipedia:

In experimental sciences, noise can refer to any random fluctuations of data that hinders perception of an expected signal.

So in that context, even adding or subtracting a constant value to the entire image could be coined as noise (especially if this makes the image too bright or too dark so as to make it harder to discern objects in the image). If on the other hand we focus our attention to what is commonly described as a "noise" effect then this typically refer to some kind of perceived "dots" that occurs due to somewhat large variations in pixel values in close proximity. Since the variance is directly linked to the variation in pixel values, it is clear that an increase of the variance would increase the amount of noise (in the sense of perceived quantity of "dots").

$\endgroup$
0
$\begingroup$

A Gaussian noise is a random process which, when simulated, produces realizations added to the image. First, let us note that the image is of type uint8, with integer values from $0$ to $255$. A random effect is often of float type. Here, adding a noise to uint8 data yields uint8 data. Hence, you have an additional quantization effect (a rounding of non integer value). This effect is completed by a saturation effect: negative values are cast to zero, values above $255$ are set to $255$. So positive noise components plus saturation often means more brightness. Conversely, negative noise yields darkening.

Let us now look at the effect on a single pixel. Add a Gaussian noise with average $\mu$ and variance $\sigma^2$. Since one realization takes values in $]-\infty,\infty[$, it might happen that the realization has a negative value. Hence, the noisy pixel will be darker. From the Gaussian empirical rule, you have about 16% chance for that with your parameters (chances that the realization is below $\mu -\sigma = 0$). For one given realization, it might happen that all the noises for each pixel are negative, around $0.16^N$ if $N$ is the number of pixels, and the image will be darker (up to quantization). So it is quite unlikely for a sufficiently large picture.

Does mean increases the brightness?

If it is positive, yes, with a large probability. Especially since the image is saturated

Does variance increases the amount of noise?

If you consider your image as clean, yes, in general. However, if your image is already noisy, adding an uncorrelated noise can, in some cases, counterbalance the natural noise. In your case, i'd say yes. However, adding noise can increase the "quality", as used in dithering for instance:

Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.