Noise in Digital Image Processing
Published: 2023-07-16 08:18:36

---
title: Noise in Digital Image Processing
published: true
date: 2018-08-28 06:30:39 UTC
tags: 
canonical_url: https://theuigirl.hashnode.dev/noise-in-digital-image-processing-55357c9fab71
---

#### IMAGE TECHNOLOGY

#### Noise is always presents in digital images during image acquisition, coding, transmission, and processing steps.

Hello fellas, here I am back with yet another article of our series. Here we will talk about noise present in a digital image. While talking about digital image processing there comes an integrated part of it which is Noise.

Noise is always presents in digital images during image acquisition, coding, transmission, and processing steps. It is very difficult to remove noise from the digital images without the prior knowledge of filtering techniques.

In this tutorial, we together will get a brief overview of various noise and the filtering techniques of the same is described. These filters can be selected by analysis of the noise behaviour. In this way, a complete and quantitative analysis of noise and their best suited filters will be presented over here.

#### Definition of Image:

Before going into Image processing lets talk about image itself. Many of us think of an image as a picture that we see in a wall or magazine etc.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1688558437760/75bff183-6f78-435d-9290-a36fe0ccdb79.png)

Fig.1 Indication pixel(x,y) in an image

A(x,y) = H(x,y) + B(x,y) Where, A(x,y)= function of noisy image, H(x,y)= function of image noise , B(x,y)= function of original image.But in theoretical terms, a picture that we look at is a function of image intensity at a particular position in the image. I.e **_I(x,y) is an image function_ where I = Intensity at position (x,y) in an image.**

#### Types of digital images:

There are typically three types of digital images.

- Binary Images
- Gray Scale Images
- Color Images

We can describe image as a function **_f_** where **x** belongs to [a,b] and y belongs to [c,d] which returns as output ranging between maximum and minimum pixel intensity values.

So, it can be stated as, **_f: [a,b] \_ [c,d] -> [min,max]\***

**1.Binary images**

_f: [a,b] \_ [c,d] -> 0 or 255 (For binary images, the output of the function is either the brightest pixel 255 or the darkest pixel 0)\*

**2.Gray Scale images**

_f: [a,b] \_ [c,d] -> [min,max](For gray-scale images, the output of the function is a range of possible values from the brightest pixel 255 to the darkest pixel 0)\*

**3. Color Images**

For color images they are three functions stacked together as a vector valued function. Those function represent red , blue and green pixel values.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1688558439322/d57894f4-36fd-4dfb-a4d1-17eafe527066.png)

#### Noise in images:

Image noise is random variation of brightness or color information in the images captured. It is degradation in image signal caused by external sources.Images containing multiplicative noise have the characteristic that the brighter the area the noisier it. But mostly it is additive. We can model a noisy image as

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1688558441712/46b56bc1-13a1-4dbf-80f9-0316c98c2815.png)

Fig.2 Addition of random noise in an image

**_A(x,y) = H(x,y) + B(x,y)_** Where, A(x,y)= function of noisy image, H(x,y)= function of image noise , B(x,y)= function of original image.

#### Sources of Image noise:

- While image being sent electronically from one place to another.
- **Sensor heat** while clicking an image.
- With varying **ISO Factor** which varies with the capacity of camera to absorb light.

#### Types of Image noise:

There are different types of image noise. They can typically be divided into 3 types.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1688558444206/0576479e-99f3-410a-904e-b431ac5b73f3.png)

Fig.3 classification of noise

#### 1. Gaussian Noise:

Gaussian Noise is a statistical noise having a probability density function equal to normal distribution, also known as Gaussian Distribution. Random Gaussian function is added to Image function to generate this noise. It is also called as electronic noise because it arises in amplifiers or detectors. Source: thermal vibration of atoms and discrete nature of radiation of warm objects.

![](https://cdn-images-1.medium.com/max/800/1*GbmaeKQiNmYlhpCEcCO-9Q.png)

Fig.4 Plot of Probability Distribution Function

The side image is a bell shaped probability distribution function which have mean 0 and standard deviation(sigma) 1.

#### 1.1 Implementation of Gaussian Noise with OpenCV-Python:

![](https://cdn-images-1.medium.com/max/800/1*hoenzPKOsKT3xd1BAifURA.png)

#### 1.2 Effect of Standard Deviation(sigma) on Gaussian noise:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1688558450178/55f50c89-33b6-4abc-9440-ead8d1da7d06.png)

Fig.5 Effect of Sigma on Gaussian Noise

The magnitude of Gaussian Noise depends on the Standard Deviation(sigma). Noise Magnitude is directly proportional to the sigma value.

#### 2. **Impulse Noise:**

Impulse Function: In the discrete world impulse function on a vale of 1 at a single location and In continuous world impulse function is an idealised function having unit area.

![](https://cdn-images-1.medium.com/max/800/1*c90COqTwth3bFULJXdUYiw.png)

Fig.6 Impulse function in discrete world and continuous world

#### 2.1 Types of Impulse Noise:

There are three types of impulse noises. Salt Noise, Pepper Noise, Salt and Pepper Noise.

**Salt Noise:** Salt noise is added to an image by addition of random bright (with 255 pixel value) all over the image.

**Pepper Noise:** Salt noise is added to an image by addition of random dark (with 0 pixel value) all over the image.

**Salt and Pepper Noise:** Salt and Pepper noise is added to an image by addition of both random bright (with 255 pixel value) and random dark (with 0 pixel value) all over the image.This model is also known as data drop noise because statistically it drop the original data values [5]. Source: Malfunctioning of cameras sensor cell.

#### 2.2 Implementation of Salt and Pepper Noise with OpenCV-Python:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1688558454481/1e4a72e0-f495-4209-966d-2d1350dcbbf3.png)

#### 3. Poisson Noise:

The appearance of this noise is seen due to the statistical nature of electromagnetic waves such as x-rays, visible lights and gamma rays. The x-ray and gamma ray sources emitted number of photons per unit time. These rays are injected in patients body from its source, in medical x rays and gamma rays imaging systems. These sources are having random fluctuation of photons. Result gathered image has spatial and temporal randomness. This noise is also called as quantum (photon) noise or shot noise.

#### 3.1 Implementation of Poisson Noise Noise with OpenCV-Python:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1688558457491/180611c3-0c97-466e-a228-a5fcdf76d6bf.png)

#### 4. Speckle Noise

A fundamental problem in optical and digital holography is the presence of speckle noise in the image reconstruction process. Speckle is a granular noise that inherently exists in an image and degrades its quality. Speckle noise can be generated by multiplying random pixel values with different pixels of an image.

#### 4.1 Implementation of Poisson Noise Noise with OpenCV-Python:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1688558460111/7d6f63a2-48f4-4438-b841-37678b570b34.png)

So with this we have discussed about various common type of noise that exists in a digital image. But it is not necessary that only one type of noise will be present in a particular image. That can be combination of different noise. So it is very important to know about different filtering techniques to remove these noise for betterment and enhancement of the image. In next article, we will briefly discuss on various filtering techniques and the filters used to do so. Till then stay stay tuned with us and let us know your queries with your comments. Happy Coding!

> _Let us your thoughts about the article in the comment section below and if you want to connect with me, here I am ->_ [_Twitter_](https://twitter.com/anishaswain) _or_ [_Linkedin_](https://www.linkedin.com/in/anisha1234) _or_ [_Instagram_](https://www.instagram.com/anisha_swain_/)