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

IIT (ISM) Dhanbad

CSC401 INSTRUCTOR

PROJECT - I Prof. Sushanta


Mukhopadhyay

Multi-stage image denoising PRESENTED BY

with the wavelet transform Naman Muniya


Neelansh Bansiwal
Shreyas Sarve

10/11/23
Problem Statement

In the domain of digital image processing, noise interference remains a persistent


challenge, degrading image quality and impeding accurate information extraction.
Traditional convolutional neural network (CNN)-based denoising methods
necessitate complex and deep architectures, leading to increased computational
demands and prolonged training times. This project introduces a novel Multi-
Stage Wavelet Deep Convolutional Neural Network (MWDCNN) that innovatively
combines dynamic convolution, wavelet-based feature enhancement, and
residual learning. The goal is to achieve state-of-the-art denoising performance
that not only effectively suppresses noise across various conditions but also
preserves the fine details and structural integrity of images, all while maintaining
computational efficiency.
Noise Definition
What is Image Noise?

Noise in images refers to random variations of


brightness or color information that result in visual
distortion. It's similar to the grainy specks seen on
old photographs or the static on a television with
poor reception. Noise can occur from errors in image
capture, like poor lighting or high temperatures, or
during transmission and storage.
Causes of Image Noise
During Image Capture:
Poor Lighting.
High Temperatures.
Sensor Quality.
Long Exposure Times.

During Transmission and Storage:


Compression.
Transmission Errors.
Storage Degradation.
Need for Noise Removal
Presence of Noise can have negative
effects in:
Medical Imaging.
Astronomical Observations.
Computer Vision tasks like noisy and noise filtered x-ray image

Object Recognition or Tracking.


Aesthetic value of Visuals.

noisy and noise filtered astronomy image


General 1 Image Formation Model

Concepts
of 2 Image Storage

Image
Processing
3 Noise vs Features
Image Formation Model
Images are denoted by two-dimensional functions of the form f(x, y). The value or amplitude of f at spatial
coordinates (x, y) is a positive scalar quantity whose physical meaning is determined by the source of the
image. When an image is generated from a physical process, its intensity values are proportional to energy
radiated by a physical source (e.g., electromagnetic waves). As a consequence, f(x, y) must be nonzero and
finite; that is,
0 < f(x, y) < ∞
The function f(x, y) may be characterized by two components illumination and reflectance, and are denoted
by i(x, y) and r(x, y).

f(x, y) = i(x, y) r(x, y)


0 < i(x, y) < ∞
0 < r(x, y) < 1
Image Storage
Each element of this matrix is called an
image element, picture element, or
pixel

For storage and quantizing hardware considerations, the number of intensity levels typically is an integer power of 2:

The number, b, of bits required to store a digitized image is


Differentiating between Noise and Feature is an important aspect to be kept in mind
when removing noise from an image.
Image Filtering: Enhancing and
Transforming Images
In digital image processing,certain operations are use to
remove noises. Image filtering is a most important part of the
smoothing process. We will discuss about different types of
image filters and their characteristics.

What is a filter
Filters are essentially matrices of coefficients that are applied
to corresponding pixels in the image.

Filters can be used for various purposes, such as noise


reduction, smoothing, edge detection, sharpening, and more.
Mean Filter
The mean filter is a linear filter and is like a gentle painter. It
smooths out rough spots, reduces noise, and makes your
picture look more even. It's an easy and useful tool for
enhancing images by averaging colors in small areas.

How the Mean Filter Works:


Neighborhood Gathering: Imagine your picture is divided
into little squares like a grid. The mean filter looks at a
small group of squares, which we call a "neighborhood."
It's like looking at a small part of your picture at a time.
Average Magic: Inside this neighborhood, the filter adds
up all the colors and divides by the number of squares.
This gives us an average color, which becomes the new
color for that part of your picture.
Median Filter
Median filter is a non-linear filter. It replaces each pixel
values by the median values of it’s neighbor pixels. The
median filter is particularly useful in various applications due
to its noise reduction and edge-preserving properties.The
calculation of the median value is given in the image.

How the Median Filter Works:


Neighborhood Selection: filter is defied such as a 3x3,
5x5, or any other dimension, depending on the filter's
requirements.
Sorting: Within the chosen neighborhood, the pixel values
are sorted in ascending order.
Median Computation: The pixel value at the center of the
sorted list is selected as the new pixel value for the
corresponding location in the output image. This value is
the median of the sorted list.
Gaussian Filter
A Gaussian filter is a linear image processing filter that is used
for various purposes, including noise reduction, blurring, and
smoothing..

The Gaussian Filter Equation:


.The Gaussian filter is defined by a 2D Gaussian function, and
its equation can be written as follows:

G(x,y) is the value of the Gaussian function at position


(x,y).
x and y represent the coordinates in the image.
σ (sigma) is a parameter that determines the spread or
width of the Gaussian curve.
Implementing
Mean and Median
Filters in MATLAB

In our initial code-based implementation, we ventured into the


world of image filtering. Specifically, we implemented both
mean and median filters to enhance our images. We employed
MATLAB for this task, leveraging its built-in filtering
capabilities. All we had to do was provide the image and specify
the filter size, and MATLAB autonomously handled the rest,
generating the input and output images.
Mean Filter
CODE:
originalImage = imread('your_image.jpg');
kernelSize = 3;
meanFilteredImage = imfilter(originalImage,fspecial('average',kernelSize));
subplot(1, 2, 1);
imshow(originalImage);
title('Original Image');
subplot(1, 2, 2);
imshow(meanFilteredImage);
title(['Mean Filtered (', num2str(kernelSize), 'x', num2str(kernelSize), ' kernel)']);
Median Filter
CODE:

originalImage = imread('your_image.jpg'); % Replace 'your_image.jpg'


neighborhoodSize = 3;
medianFilteredImage = medfilt2(originalImage, [neighborhoodSize, neighborhoodSize]);
subplot(1, 2, 1);
imshow(originalImage);
title('Original Image');
subplot(1, 2, 2);
imshow(medianFilteredImage);
title(['Median Filtered (', num2str(neighborhoodSize), 'x', num2str(neighborhoodSize), '
neighborhood)']);
INTRODUCTION TO
ARTIFICIAL NEUTRAL
NETWORKS
Biological neuron model

Four Parts of a nerve cell :


Dendrites: Accepts the input.
SOMA: Process the input.
AXON: Turns the processed inputs into output.
SYNAPSES: The electrochemical contact between
the neurons
Artificial Neural Network

Artificial neural network(ANNs) programs design to solve any


problem by trying to mimic the structure and the function of our
nervous system.
Nneural networks are based on simulated neurons, which are
joined together in a variety of ways to form networks.
Neural network resembles the human brain in the following two
ways:
1. A neural network acquires knowledge through learning.
2. A neural network’s knowledge is stored within the
interconnection strengths known as synaptic weight.
Model of a Neuron
Back Propogation in ANN

1. Initialization
2. Presentation of Training
3. Forward Computation
4. Backward Computation
5. Iteration of 3rd & 4th step
6. Converge
Collaborate on Add even more
Add more sub-ideas Add more sub-ideas

a Whiteboard
sub-ideas

Add even more


Add a related idea
sub-ideas

ADD A Add a related idea


Add a related idea
MAIN TOPIC

Add even more


Add a related idea sub-ideas
Tip: Collaboration makes teamwork easier! Click "Share"
and invite your teammates to fill this up. Use this page for
bulletins, brainstorms, and other fun team ideas.

Right-click on the background of the slide, or on the


thumbnail below, for the option to expand this page into a Add more sub-ideas
whiteboard for more space! Add even more
Add more sub-ideas
sub-ideas
Convolution
Neural
Network
Convolutional Neural Network
Convolutional Neural Networks (CNNs) are a specialized class of neural networks designed for
processing grid-like data, such as images and audio spectrograms. They are particularly powerful
in tasks related to computer vision. What sets CNNs apart is their ability to automatically learn and
extract intricate features from the data, reducing the need for manual feature engineering.

This is achieved through a series of layers,


Including convolutional layers that apply filters to detect patterns,
Pooling layers that downsample spatial dimensions,
and Fully connected layers that perform high-level reasoning.
Core Components
Convolutional Layers
Key feature: Convolution operation applies filters to input data to detect patterns or
features.
Enables the network to learn spatial hierarchies of features.

Pooling Layer
Reduces spatial dimensions (width and height) of feature maps.
Helps in reducing computational complexity and controlling overfitting.

Fully Connected Layers


Perform high-level reasoning on the features extracted by earlier layers.
Commonly used in the final layers of the network for classification or regression
Feature Extraction with Convolution
Filter of size 2X2 : 4 different weights
Apply this same filter to 2x2 patches in input
Shift by 2 pixels for next patch

This “patchy” operation is Convolution

1. Apply a set of weights – a filter – to extract local features


2. We use multiple filters to extract different features
Forward Propogation
Backpropagation in CNNs
Backpropagation is the essence of neural net training. It is the practice of fine-tuning the
weights of a neural net based on the error rate (i.e. loss) obtained in the previous epoch
(i.e. iteration.) Proper tuning of the weights ensures lower error rates, making the model
reliable by increasing its generalization.

The Backpropagation Algorithm consists of the following steps


1. Calculate the error: The predicted output is compared to the desired output and the error is calculated.
2. Backpropagate the error: The error is propagated backward through the network, layer by layer, in order to
update the weights of the connections between the neurons.
3. Update the weights: The weights of the connections between the neurons are updated based on the error signals
propagated back through the network.
Backpropagation Contin..
The input to the network is x and the desired output is y.
The predicted output of the network is z.
The error is calculated as follows: e = y - z

Updating the Weights


where α is the learning rate and δ is the error signal.
W1 = W1 + α * δ * x
W2 = W2 + α * δ * z

The learning rate controls how much the weights are updated on each training example
The error signal is a measure of how much the weight contributes to the error.
Wavelet
A Wavelet is a wave-like oscillation that is localized in time, an example is given below.
Wavelets have two basic properties: scale and location. Scale (or dilation) defines how
“stretched” or “squished” a wavelet is. This property is related to frequency as defined for
waves. Location defines where the wavelet is positioned in time (or space).
Wavelet Green Portion - Matched Portion

Signal
Conti. Wavelet
How Wavelet transform is different from other conventional methods?

Features Wavelet Transform Conventional Methods

Can be scaled to different levels of


Scalability Resolution is fixed
resolution

Can only capture the


Localization Can capture the location of a signal in time
frequency content of a signal

Not as well-suited for


Suitability for transient signals Well-suited for transient signals
transient signals
Bibliography
A detailed list of all the sources consulted and used while studying for project

Deep learning on image denoising: An overview


Chunwei Tian, Lunke Fei , Wenxian Zheng, Yong Xu, Wangmeng Zuo, Chia-Wen Lin

Digital image processing


Rafael c. Gonzalez

Residual Dense Network for Image Super-Resolution


Yulun Zhang; Yapeng Tian; Yu Kong; Bineng Zhong; Yun Fu

Introduction to MATLAB
Matlab

Neural Networks and Deep Learning: A Textbook


Charu C. Aggarwal
Thank You

You might also like