Image Noise Cancelling

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Bangladesh University of Business & Technology

DEPARTMENT OF ELECTRICAL & ELECTRONIC


ENGINEERING
Faculty of Engineering

April 10, 2021


Project Report
On

Adding & Removing Noise


from a Picture using MATLAB
Submitted To

Chinmoy Das
Lecturer
Department of EEE, BUBT

Submitted By

Name ID Intake/Section
Chandan Biswas 17181208034 22/1
Gazi Mostofa Zaman 17181208012 22/1
Md. Amin Khan 17181208009 22/1
MD Arifur Rahaman 17181208011 22/1
Gazi Mizanur Rahaman 17181208020 22/1
Sheik Shariare Ahamed 17181208042 22/1
Rashedul Hasan Shuvo 17181208053 22/1
Dedicated to

Our Parents
and
Honorable Teacher
CONFESSION
I express my gratitude and sincere thanks to my teacher Chinmoy Das, Department of Electrical
and Electronics Engineering for his gracious efforts and keen pursuit, which has remained as a
valuable asset for the successful of our project report. His dynamism and diligent enthusiasm have
been highly instrumental in keeping my spirits high. His flawless and forthright suggestions
blended with an innate intelligent application have crowned my task with success. I truly
appreciate and value his esteemed guidance and encouragement from the beginning to the end of
this thesis. I am indebted to him for having helped me shape the problem and providing insights
towards the solution.

At last but not the least I am highly thankful to the THE ALMIGHTY, who has given me the courage
and wisdom throughout this whole journey.
Table of Contents

Chapter 1 Introduction

1.1 Description
1.2 Objective

Chapter 2 Background

2.1 Description
2.2 Motivation

Chapter 3 Literature Review

3.1 What is Picture Noise?


3.2 Reson of Adding Noise?
3.3 Reson of Removing Noise?
Chapter 4 Using Matlab

4.1 Discussion on MATLAB Code


4.2 Source Code
4.3 Source image

Chapter 5 Result

5.1 Image After Adding noise


5.2 Image After Removing noise

Chapter 6 Discussion on Project

Chapter 7 Reference
ABSTRACT

Images are often degraded by noises. Noise can occur and obtained during image
capture, transmission, etc. Noise removal is an important task in image
processing. In general the results of the noise removal have a strong influence on
the quality of the image processing techniques. Several techniques for noise
removal are well established in color image processing. The nature of the noise
removal problem depends on the type of the noise corrupting the image. In the
field of image noise reduction several linear and nonlinear filtering methods have
been proposed. Linear filters are not able to effectively eliminate impulse noise as
they have a tendency to blur the edges of an image. On the other hand nonlinear
filters are suited for dealing with impulse noise. Several nonlinear filters based on
Classical and fuzzy techniques have emerged in the past few years. For example
most classical filters that remove simultaneously blur the edges, while fuzzy filters
have the ability to combine edge preservation and smoothing. Compared to other
nonlinear techniques, fuzzy filters are able to represent knowledge in a
comprehensible way. In this paper we present results for different filtering
techniques and we compare the results for these techniques.
CHAPTER 1
INTRODUCTION

1.1 Description

Noise is a random variation of image Intensity and visible as a part of grains in the
image. It may cause to arise in the image as effects of basic physics-like photon
nature of light or thermal energy of heat inside the image sensors [16]. It may
produce at the time of capturing or image transmission. Noise means, the pixels in
the image show different intensity values instead of true pixel values that are
obtained from image. Noise removal algorithm is the process of removing or
reducing the noise from the image. The noise removal algorithms reduce or remove
the visibility of noise by smoothing the entire image leaving areas near contrast
boundaries. But these methods can obscure fine, low contrast details [1]. The
common types of noise that arises in the image are: a) Impulse noise, b) Additive
noise [9] c) Multiplicative noise. Different noises have their own characteristics
which make them distinguishable from others. Image noise can also originate in
film grain and in the unavoidable shot noise of an ideal photon detector. Image
noise is an undesirable by-product of image captured.

1.2 Objective
➢ Describe the Adding noise to images allows you to test the robustness
and performance of an algorithm.
➢ Derive the impulse responses of the values that the noise can take on
are Gaussian-distributed.
➢ Describe the Noise removal algorithm is
the process of removing or reducing the noise from the image.
➢ Demonstrate the tools in MATLAB for the adding or removing noise
from a picture.
CHAPTER 2

BACKGROUND

2.1 Description

There are many types of noise removal and many are best suited for a particular
kind of noise. If you have isolated salt and pepper noise, I have a modified median
filter that does a great job on that. There are other denoising methods with
different properties and effect. It seems BM3D is the current state of the art that
people are trying to beat. There are others that are almost as good and perhaps
even better for certain types of images. They range from the simple mean and
median to slightly more complicated sigma filters and knn filters to more
sophisticated and complicated mean shift, non-local means, BM3D, K-LLD, UINTA,
K-SVD, plus more being invented every month. Look up some of those. I know there
are some non-local means programs in the File Exchange. Maybe you can start with
those.
2.1 Motivation

Digital images are prone to various types of noise. Noise is the result of errors in
the image acquisition process that result in pixel values that do not reflect the true
intensities of the real scene. There are several ways that noise can be introduced
into an image, depending on how the image is created. For example:
• If the image is scanned from a photograph made on film, the film grain is a source
of noise. Noise can also be the result of damage to the film, or be introduced by the
scanner itself.
• If the image is acquired directly in a digital format, the mechanism for gathering
the data (such as a CCD detector) can introduce noise.
• Electronic transmission of image data can introduce noise.
To simulate the effects of some of the problems listed above, the toolbox provides
the imnoise function, which you can use to add various types of noise to an image.
The examples in this section use this function.
CHAPTER 3

LITERATURE

REVIEW

3.1 What is Picture Noise?


Noise is a topic in photography that seems made to cause confusion. However, it is
crucial to understand it if you want to maximize image quality. In this article, we
will go into detail about the two types of noise that affect your photos, shot noise
and digital noise, and what you can do to minimize them. We will also explain the
connection between things like your camera’s ISO and the amount of noise in your
photos. So, what is noise in photography, and what can you do to reduce it?

Several years before I bought my first DSLR, I had a point-and-shoot that I really
wanted to learn how to use – but I was clueless about photography. When I read
online that a high ISO setting “adds more noise” to a photo, naturally, I started
thinking that a camera actually grows louder at those settings. I tested this theory
by taking two photos at different ISO values, and – I could have sworn it! – the
camera’s shutter was significantly louder at the higher ISO. For an embarrassingly
long time afterwards, I went around thinking that high ISO values were fine to use,
except in museums or cathedrals where silence was required. I doubt that many
other people have been so hopelessly misguided about noise, but there still are
several aspects of noise that even advanced photographers often misunderstand.

Image noise is random variation of brightness or color information in images, and


is usually an aspect of electronic noise. It can be produced by the image sensor and
circuitry of a scanner or digital camera. Image noise can also originate in film grain
and in the unavoidable shot noise of an ideal photon detector.
3.2 Reason of Adding Noise:
Image noise is random variation of brightness or color information in images, and
is usually an aspect of electronic noise. It can be produced by the image sensor and
circuitry of a scanner or digital camera. Image noise can also originate in film grain
and in the unavoidable shot noise of an ideal photon detector.

3.3 Reason of Removing Noise:


The reason is that JPEG images already have compression applied to them. This
means that there is already some noise, and what is known as JPEG artefacts, in
the image. ... Also, in post-production, you have much more flexibility removing
noise, and increasing exposure, with a RAW file than a JPEG.
CHAPTER 4
USING MATLAB

4.1 DISCUSSION ON MATLAB CODE:


• The mean and variance parameters for 'gaussian', 'localvar', and 'speckle' noise
types are always specified as if the image were of class double in the range [0,
1]. If the input image is a different class, the imnoise function converts the
image to double, adds noise according to the specified type and parameters,
clips pixel values to the range [0, 1], and then converts the noisy image back to
the same class as the input.
• The Poisson distribution depends on the data type of input image I:
• If I is double precision, then input pixel values are interpreted as means of
Poisson distributions scaled up by 1e12. For example, if an input pixel has the
value 5.5e-12, then the corresponding output pixel will be generated from a
Poisson distribution with mean of 5.5 and then scaled down by 1e12.
• If I is single precision, the scale factor used is 1e6.
• If I is uint8 or uint16, then input pixel values are used directly without scaling.
For example, if a pixel in a uint8 input has the value 10, then the corresponding
output pixel will be generated from a Poisson distribution with mean 10.
• To add 'salt & pepper' noise with density d to an image, imnoise first assigns
each pixel a random probability value from a standard uniform distribution on
the open interval (0, 1).
• For pixels with probability value in the range (0, d/2), the pixel value is set to 0.
The number of pixels that are set to 0 is approximately d*numel(I)/2.
• For pixels with probability value in the range [d/2, d), the pixel value is set to the
maximum value of the image data type. The number of pixels that are set to the
maximum value is approximately d*numel(I)/2.
• For pixels with probability value in the range [d, 1), the pixel value is unchanged.
4.2 SOURCE CODE

clear all
close all
imaage = imread('cat.jpg');
imaage_noise = imnoise(imaage,'salt & pepper',0.07);
mf = ones(3, 3)/9;
nf = imfilter(imaage_noise,mf);
close all
subplot (2,2,1),imshow(imaage), title ('Main image');
subplot (2,2,2),imshow(imaage_noise), title('After Ading noise');
subplot (2,2,3),imshow(nf), title('After removing noise');

4.3 SOURCE IMAGE

We can use any image we desire, but here we use an image of a cat (as shown in
source code)
CHAPTER 5
RESULT

5.1 AFTER ADDING NOISE


here is the picture after adding salt and pepper noise (the main image is shown in
4.3)
5.2 AFTER REMOVING NOISE
The picture that shown here is after removing noise from it (the noised picture is
at 5.1)
CHAPTER 6
DISCUSSION ON PROJECT

MATLAB is a software Millions of engineers and scientists worldwide use


MATLAB for a range of applications, in industry and academia, including deep
learning and machine learning, signal processing and communications, image and
video processing, control systems, test and measurement, computational finance,
and computational biology.

For our case we used MATLAB for Digital Signal processing, Noise, as defined by
Adobe, adds “pixels with randomly distributed color levels.” Simply
put, noise imposes a random value to the pixels that make up an image. In fact,
using noise in images often can help hide problem areas such as banding and
awkward cloning.

Noise is always presents in digital images during image acquisition, coding,


transmission, and processing steps. Filtering image data is a standard process used
in almost every image processing system. Filters are used for this purpose.
They remove noise from images by preserving the details of the same.

For our case we used salt and pepper noise, as you can see after adding and
removing noise , picture is more sharper, though some noise is still there but along
the process the image became sharper and have more contrast .
CHAPTER 7
REFERENCE
Because of our project was a software base project, we seek help from the official
community of the software MATLAB.

here is the link of the official community:


https://www.mathworks.com/matlabcentral/

You might also like