Image Noise -Basic of computer vision (Part-02)

Shafayet Ul Islam
3 min readJun 23, 2020

--

In the last article we talked about image derivatives. Let’s put a hold on that for a moment. we’ll get back there later. Today, Let’s talk about the Image Noise.

What is Image noise?

Well, in computer vision we deal with various types of image that were taken in different circumstances.

In a very basic level, let’s say we are dealing with 3 types of images:

1. Binary Image (contains pixel value of 0 and 1)
2. Grey scale Image (contains pixel value between 0 to 255 with a single channel)
3. RGB Image (Have three channels — Red, Green, Blue: each contains pixel values between 0 to 255)

Now, while any of these images are taken by camera there might be issues like “light variation”, “Surface reflectance”, “lens issue” etc etc…
And for these different kinds of problems images get noisy.

So, we can say in a bit more mathematical way that, Noise is random, we have no idea where and how it may appear and so, it occurs with a random probability. And as it occurs with random probability it has a distribution.

Looks like now we have to deal with some probability distributions. LOL, Maths again!!

Probability Distribution: Gaussian Distribution and Uniform Distribution

Gaussian Distribution:
Gaussian distribution is a type of continuous probability distribution for a random variable (say x). The formula for gaussian distribution is:

Gaussian distribution formula

Here, µ = mean and
𝜎 = standard deviation

Gaussian Distribution [ source: wikipedia and google image]

Uniform Distribution:
okay let’s say you are rolling a fair dice. now the probability of getting one is 1/6, probability of getting two is 1/6 and so on. So, each time the probability is same (always 1/6). This is know as Discrete uniform probability distribution.

But images doesn’t deal with Discrete uniform probability distribution, as we know in an image, values of each channel is always between 0 to 255. So, there is a max and a min value and we can say this continuous. So, here we are dealing with continuous uniform probability distribution. In wiki you can learn more about this.

continuous uniform probability distribution. Here a and b are the min and max we were talking about [source: wikipedia and google image]

Generating Noise

Now, we can generate noise using these probability distribution function. And we can do it in two ways:

  1. Additive Noise (where you add the image with noise)
  2. Multiplicative Noise (where you multiply the image with noise)

Gaussian Noise:
We can use gaussian probability distribution formula to generate noise n(x, y) where probability distribution n is a random variable.
Now we can use additive method like (mostly used):
I_noise(x, y) = I(x, y) + n(x, y)
or we can use multiplicative method like:
I_noise(x, y) = I(x, y) * n(x, y)

Normal Image (left) and Noisy image, generated by 5% Gaussian noise (right) [source: google image]

Salt and Pepper Noise:
Well, salt and pepper noise use uniform probability distribution underneath to generate a noisy image. we can use same additive or multiplicative methods to create this image and noise n(x, y) are generated by using uniform probability distribution formula

uniform probability distribution formula
Normal Image (left) and Noisy image (right) [source: google image]

So, This is, what Image Noise is and how we can generate noise by using simple probability distribution. Next, we’ll talk about convolution and filtering. That’s all for today…

--

--

Shafayet Ul Islam

A computer science undergrad who loves to design and develop. I am a machine learning enthusiast who loves to explore with a mug full of coffee.