Professional Documents
Culture Documents
Abstract
Digital images restoration from their degraded measurement has always been a problem
of great interest. A specific solution to the problem of image restoration is generally determined
by the nature of degradation phenomena. So it is highly dependent on the nature of the noise
present there. In this project Lucy Richardson algorithm (LRA) is implemented on the X-ray
image using Matlab and restoration is processes is observed. LRA is a non blind technique of
image restoration, used to restore a degraded image that has been degraded by a known PSF. It is
an iterative procedure in which the pixels of the observed image are represented using the PSF.
Image restoration is an emerging field of image processing in which the focus is on recovering
an original image from a degraded image. The degraded image can be a result of a known
degradation or unknown degradation. Hence image restoration can be defined as a process of
recovering a sharp image from a degraded image which is blurred by a degradation function,
commonly by a Point Spread Function (PSF). The Point Spread Function describes the response
of an imaging system to a point source or point object
CHAPTER 1
INTRODUCTION
1. An Image:
An image refers to a 2D light intensity function f(x,y), where (x,y) denote spatial coordinates
and the value of f at any point (x,y) is proportional to the brightness or gray levels of the image
at that point. A digital image is an image f(x,y) that has been discretized both in spatial
coordinates and brightness. The elements of such a digital array are called image elements or
pixels.
A simple image model:
To be suitable for computer processing, an image f(x,y) must be digitalized both spatially and in
amplitude.Digitization of the spatial coordinates (x,y) is called image sampling.Amplitude
digitization is called gray-level quantization. The storage and processing requirements increase
rapidly with the spatial resolution and the number of gray levels.
1.1.Introduction of digital images processing:
Digital image processing deals with manipulation of digital images through a digital
computer. It is a subfield of signals and systems but focus particularly on images. DIP focuses on
developing a computer system that is able to perform processing on an image. The input of that
system is a digital image and the system process that image using efficient algorithms, and gives
an image as an output. The most common example is Adobe Photoshop. It is one of the widely
used application for processing digital images.
Figure: 1.1.An image has been captured by a camera and has been sent to a digital system
In the above figure, an image has been captured by a camera and has been sent to a digital
system to remove all the other details, and just focus on the water drop by zooming it in such a
way that the quality of the image remains the same.
Image restoration is the process of clearing the degraded image to obtain the original
image. The main aim of the work is to restore the blurred X-Ray image using Blind Image
Restoration. It is very important part of image restoration to recover image without the
knowledge of the reason of its degradation. At first, the original X-Ray image is degraded using
the Degradation Model. With the addition of blur we get the blurred X-Ray image.
X-ray imaging is the fastest and easiest way for a physician to view and assess broken bones,
cracked skull and an injured spine. Images of the injury can show very fine hairline fractures or
chips, while images produced after treatment ensure a fracture has been properly aligned and
stabilised for healing.
X-rays play a key role in orthopaedic surgery such as spinal repair, joint replacements or fracture
reductions. Bone x-rays are an essential tool in the treatment of many sports injuries. X-rays can
be useful in detecting advanced forms of bone cancer, although very early detection of bone
cancer requires other methods such as Computerised Tomography (CT) or Magnetic Resonance
Imaging (MRI).
X-rays can be used to diagnose and monitor the progression of degenerative diseases such as
arthritis. Severe osteoporosis may be visible on x-rays, but bone densitometry is used to detect
early loss of bone density and is done on special equipment.as the doctor cant identify the
disease directly by analyzing the x-ray image inorder to identify the disease using x-ray image
we are going to use lucy Richardson algorithm.by using this algorithm we can easily identify the
disease.
1.3.Proposed work:
LRA stands for Lucy Richardson Algorithm which is used for image restoration. It is a
non blind technique of image restoration, used to restore a degraded image that has been
CHAPTER 2
Back ground information
2.Introduction:
Flag preparing is a train in electrical building and in science that arrangements with investigation and
handling of simple and advanced flags and manages putting away , sifting and different operations on signs. These
signs incorporate transmission signals , sound or voice signals , picture signals,and different signs e.t.c.
Out of every one of these signs , the field that arrangements with the kind of signs for which the info is a picture and
the yield is likewise a picture is done in picture handling. As it name proposes, it manages the preparing on images.It
can be further partitioned into simple picture handling and computerized picture preparing.
The digital image processing deals with developing a digital system that performs
operations on a digital image.
2.2.1.Image:
128 30 123
123 77 89
80 255 255
Table: 2.2.1(a).A two dimensional array of numbers ranging between 0 and 255.
Each number represents the value of the function f(x,y) at any point. In this case the value 128 ,
230 ,123 each represents an individual pixel value. The dimensions of the picture is actually the
dimensions of this two dimensional array.
Signal:
In physical world, any amount quantifiable through time over space or any higher
measurement can be taken as a flag. A flag is a scientific capacity, and it passes on some
information.A flag can be one dimensional or two dimensional or higher dimensional flag. One
dimensional flag is a flag that is measured after some time. The regular case is a voice flag.
The two dimensional signs are those that are measured over some other physical amounts. The
case of two dimensional flag is a computerized picture. We will look in more detail in the
following instructional exercise of how a one dimensional or two dimensional single and higher
signs are shaped and translated.
Relationship:
Since anything that passes on data or communicate a message in physical world between
two eyewitnesses is a flag. That incorporates discourse or (human voice) or a picture as a flag.
Since when we talk, our voice is changed over to a sound wave/flag and changed as for the
opportunity to individual we are addressing. This , as well as the way a computerized camera
works, as while gaining a picture from an advanced camera includes exchange of a flag from
one a player in the framework to the next.
Signal processing:
Signal processing is an umbrella and image processing lies under it. The amount of light
reflected by an object in the physical world (3d world) is pass through the lens of the camera and
it becomes a 2d signal and hence result in image formation. This image is then digitized using
methods of signal processing and then this digital image is manipulated in digital image
processing.
Restoration of digital images from their degraded measurement has always been a problem of
great interest. A specific solution to the problem of image restoration is generally determined by
the nature of degradation phenomena. So it is highly dependent on the nature of the
noise present there. Given the noise function, one can use the Richardson-Lucy Algorithm to
restore the degraded image. This algorithm was introduced by W.H. Richardson (1972) and L.B.
Lucy (1974).
An image is nothing but a huge collection of numbers known as pixels. In particular a gray
image is an image in which the value of each pixel is a single sample, that is it carries only
intensity information. So a pixel in a given image is just the intensity at that particular point. The
pixel value is a number between 0 and 1 (both inclusive). 0 denotes the total absence (i.e. black)
and 1 denotes the total presence (i.e. white).
Image restoration is based on the attempt to improve the quality of an image through knowledge
of the physical process which led to its formation. The purpose of image restoration is to
"compensate for" or "undo" defects which degrade an image. Degradation comes in many forms
such as motion blur, noise, and camera mis-focus. In cases like motion blur, it is possible to come
up with a very good estimate of the actual blurring function and "undo" the blur to restore the
original image. In cases where the image is corrupted by noise, the best we may hope to do is to
compensate for the degradation it caused. Image restoration differs from image enhancement in
that the latter is concerned more with accentuation or extraction of image features rather than
restoration of degradations. Image restoration problems can be quantified precisely, whereas
enhancement criteria are difficult to represent mathematically. Image restoration started in
1950s. There are several application domain of image restoration like scientific exploration,
legal investigations, film making and archrivals, image and video decoding and consumer
photography.
In general there are two types of restoration methods are used. One is non-blind restoration in
which we need prior knowledge of h(x,y). In this case three filtering techniques are generally
used : Wiener filtering, Constraint least square filtering and Lucy Richardson algorithm which
are discussed . Other one is Blind Restoration in which we do not need any prior knowledge of
h(x,y) . The image restoration model is shown in figure 2.3.2. It consist of taking a non-blurred
image f(x,y), creating a known blurring function or point spread function h(x,y) and then
filtering the image with this function so as to add blur into it.This image is further corrupted
additive Gaussian noise to get the degraded image g(x, y). This degraded image is passed
through a restoration filter R(x,y) to get the restored image
we are focussing on non-blind restoration methods. We have restored the degraded image by
using proposed modified Lucy Richardson Algorithm.Since DWT has excellent spatial
localization and multi-resolution characteristics, which are similar to the theoretical models of
the human visual system it is widely used in image processing. In the proposed modified LR
algorithm we have taken the DWT of degraded image and then apply LR algorithm to it. Further
the performance of the proposed algorithm is compared with wiener filter.
2.3.2 Applications of Image Restoration:
Applications in the field of image restoration are:
The first application of digital image restoration in the engineering community was in the
area of astronomical imaging.Extraterrestrial observations of the Earth and the planets were
degraded by motion blur as a result of slow camera shutter speeds relative to rapid spacecraft
motion. The astronomical imaging degradation problem is often characterized by Poisson noise,
Gaussian noise etc.
In the area of medical imaging, image restoration has played a very important role. Restoration
has been used for mammograms, filtering of Poisson distributed film-grain noise in chest X-rays
and digital angiographic images, and for the removal of additive noise in Magnetic resonance
Imaging.
Another important application of restoration technique is to restore aging and deteriorated films.
The motion picture restoration is often associated with digital techniques are used to eliminate
scratches and dust from old movies and also to colorize black and white films. There has been
significant work in the area of restoration of image sequences and well explained in literature.
The expanding area of application for digital image restoration is that in the field of image and
video coding. As techniques are developed to improve coding efficiency, and reduce the bit rates
of coded images. Much has been accomplished to develop ways of restoring coded images as a
post-processing step to be performed after decompression.
Digital image recovery has also been used to restore blurred X-ray images of aircraft wings to
improve aeronautical federal control procedures. It is for the recovery of the motion induced in
the present frame or composite effects, and is generally used, restoring television images blurred
uniformly.
2.4.Introduction to Noise Signals:
In hardware, commotion is characterized as an undesired electrical flag. While commotion is
viewed as undesirable much of the time, is picture reproduction in radio space science, radar
imaging and tomography.noise really can be helpful and permit you to describe frameworks.
Since white arbitrary clamor has an intrinsically level recurrence range, you can utilize white
irregular commotion to describe the recurrence reaction of frameworks, for example, channels.
You additionally can utilize falsely made clamor to describe frameworks. Misleadingly made
commotion regularly depends on arbitrary number generators made with a calculation whose
yield rehashes simply after an altogether expansive number of tests. Every yield test is around
measurably free. The calculations used to create irregular numbers frequently depend on a seed
esteem that indicates the beginning stage of the calculation. Current irregular number generators
can create successions that rehash simply after 2^(19937)- 1 tests. This archive gives a review of
the various types of commotion and talks about how you can utilize clamor to portray
frameworks.
2.4.1.NOISE MODELS:
Where g = gray value, s = standard deviation and = mean. Generally Gaussian noise
mathematical model represents the correct approximation of real world scenarios. In this noise
model, the mean value is zero, variance is 0.1 and 256 gray levels in terms of its PDF, which is
shown in Fig.2.4.1.a(i).
Due to this equal randomness the normalized Gaussian noise curve look like in bell shaped. The
PDF of this noise model shows that 70% to 90% noisy pixel values of degraded image in
Between s and +s. The shape of normalized histogram is almost same in spectral domain.
Gaussian distribution showing the probability y of finding a deviation x from the mean (x = 0),
according to the equation stated, where e is the base of natural logarithms, and s is the standard
deviation. The probability of larger and larger deviations can be seen to decrease rapidly.
The motivation behind this test is to show that unearthly separating strategies may not generally
be fruitful when the clamor in the picture is exceedingly non-Gaussian. We consider salt-and-
pepper clamor, for which a specific measure of the pixels in the picture are either dark or white
(henceforth the name of the commotion). Salt-and-pepper commotion can, e.g., be utilized to
model imperfections in the CCD or in the transmission of the picture. Given the likelihood r
(with 0 r 1) that a pixel is ruined, we can present salt-and-pepper clamor in a picture by
setting a small amount of r=2 haphazardly chose pixels to dark, and another portion of r=2
arbitrarily chose pixels to white. Straightforward de-noising of such pictures by method for low-
pass channels was considered. Consider now the deblurring issue with salt-and-pepper clamor.
We consider the practical circumstance where the obscured picture is defiled after it is recorded
on the CCD. In this model, we first make an obscured picture spoke to by bexact = Ax and after
that we bring salt-and-pepper commotion into this picture as depicted above, prompting to the
boisterous picture.
For your favorite grayscale test image, add Gaussian blurring to the image using psfGauss with
sigma = 2, and then corrupt 0.2 % of the pixels (i.e., r = 0:002) with salt-and-pepper noise. Then
reconstruct the image using TSVD and/or Tikhonov regularization with threshold tol and
regularization parameter alpha about 0.01. You should observe severe ringing effects in the
deblurred image around the corrupted pixels, similar to those shown in the figure below.
Figure: 2.4.1.b(iii). Exact image figure: 2.4.1.b(iv).Blurred image with salt-and-pepper noise
2.4.1.3.Rayleigh noise:
A Rayleigh distribution is often observed when the overall magnitude of a vector is
related to its directional components. One example where the Rayleigh distribution naturally
arises is when wind velocity is analyzed into its orthogonal 2-dimensional vector components.
Assuming that each component is uncorrelated, normally distributedwith equal variance, and
zero mean, then the overall wind speed (vector magnitude) will be characterized by a Rayleigh
distribution. A second example of the distribution arises in the case of random complex numbers
whose real and imaginary components are independently and identically
distributed Gaussian with equal variance and zero mean. In that case, the absolute value of the
complex number is Rayleigh-distributed.
Rayleigh noise presents in radar range images. In Rayleigh noise, probability density function is
given as
Figure:2.4.1.c(i).Rayleigh distribution
2.5.Blur Models:
Motion blur occurs when there is relative motion between the object and the camera
during exposure. This can be in the form of a translation, a rotation, a sudden change of scale, or
some combinations of these.
Atmospheric turbulence occurs due to random variations in the reflective index of the medium
between the object and the imaging system and it occurs in the imaging of astronomical objects.
When a camera images a 3-D scene onto a 2-D imaging plane, some parts of the scene are in
focus while other parts are not. If the aperture of the camera is circular, the image of any point
source is a small disk, known as the circle of confusion (COC). The degree of defocus (diameter
of the COC) depends on the focal length and the aperture number of the lens, and the distance
between camera and object. An accurate model not only describes the diameter of the COC, but
also the intensity distribution within the COC. However, if the degree of defocusing is large
relative to the wavelengths considered, a geometrical approach can be followed resulting in a
uniform intensity distribution within the COC. Uniform out of focus
2.6.Filters:
2.6.1.Wiener Filter:
The Wiener channel is the MSE-ideal stationary linearfilter for pictures debased by added
substance commotion and obscuring. The fundamental detriment of Weiner channel is that it
can't deal with clamors. So least mean square blunder sifting (Weiner channel) is utilized which
joins both the debasement work and measurable attributes of clamor into picture reclamation
prepare. In this technique it is expected that the clamor and corruption capacity are uncorrelated.
One of them has zero mean. The target capacity of Weiner channel isas takes after,
The main disadvantage of Weiner filter is that the power spectra of undergraded image and
power spectra of noise.Calculation of the Wiener filter requires the assumption that the signal
and noise processes are second-order stationary (in the random process sense).
Wiener filters are often applied in the frequency domain. Given a degraded image x(n,m), one
takes the Discrete Fourier Transform (DFT) to obtain X(u,v). The original image spectrum is
estimated by taking the product of X(u,v) with the Wiener filter G(u,v):
The inverse DFT is then used to obtain the image estimate from its spectrum. The Wiener filter is
defined in terms of these spectra:
H(u,v) fourier transform of the point-spread function (PSF)
Pr(u,v) power spectrum of the signal process, obtained by talking the fourier transform of
the signal autocorrelation
Pu(u,v) power spectrum of the noise process, obtained by talking the fourier transform of
the noise autocorrelation.
Wiener channels can't reconstructfrequency segments which have been corrupted by commotion.
They can just stifle them. Additionally, Wiener channels can't reestablish parts for which
H(u,v)=0. This implies they can't fix obscuring created by bandlimiting of H(u,v). Such
bandlimiting which happens in any certifiable imaging framework.
Wiener channels are similarly ease back to apply, since they require working in the recurrence
area. To accelerate sifting, one can take the converse FFT of the Wiener channel G(u,v) to get a
motivation reaction g(n,m). This motivation reaction can be truncated spatially to deliver a
convolution veil. The spatially truncated Wiener channel is mediocre compared to the recurrence
space rendition, yet might be much speedier.
2.6.2. Median Filter:
In flag preparing, it is regularly attractive to have the capacity to play out some sort of
commotion lessening on a picture or flag. The middle channel is a nonlinear advanced
filteringtechnique, frequently used to evacuate commotion. Such clamor diminishment is an
average pre-preparing venture to enhance the aftereffects of later handling (for instance, edge
identification on a picture). Middle separating is generally utilized as a part of advanced picture
preparing in light of the fact that, under specific conditions, it jelly edges while expelling
noise.Median sifting is a nonlinear strategy used to expel commotion from pictures. It is broadly
utilized as it is exceptionally viable at expelling commotion while safeguarding edges. It is
especially viable at expelling 'salt and pepper' sort commotion. The middle channel works by
traveling through the picture pixel by pixel, supplanting every esteem with the middle benefit of
neighboring pixels. The example of neighbors is known as the "window", which slides, pixel by
pixel over the whole picture 2 pixel, over the whole picture. The middle is figured by first sorting
all the pixel values from the window into numerical request, and after that supplanting the pixel
being considered with the center (middle) pixel esteem.
Image filtering is used to: Remove noise ,Sharpen contrast ,Highlight contours ,Detect edges .
Image filters can be classified as linear or nonlinear. 1 Linear filters are also know as convolution
filters as they can be represented using a matrix multiplication. Thresholding and image
equalisation are examples of nonlinear operations, as is the median filter.
Figure shows an image, heavily corrupted by salt and pepper noise and 3x3 median filtered is
used to remove the noise.
Table :2.6.2.d. PSNR value (dB) for % of salt and pepper noise
To restore an image from linear degradation inverse filter, pseudo inverse filter, Weiner filter and
blind deconvolution is used. These techniques are discussed below.
2.6.3. Inverse Filtering:
n signal processing for a filter g, an inverse filter h is one such that the sequence of
applying g then h to a signal results in the original signal. Software or electronic inverse filters
are often used to compensate for the effect of unwanted environmental filtering of signals.
Figure:2.6.4.a.blurred image data type byte, figure:2.6.4.b.difference between the float and byte
type images
Pseudo inverse filter can be expressed as
CHAPTER 3
UNIVERSAL ALGORITHM
3.1 Introduction:
3.1.1. PSF& Lucy Richardson algorithm:
The point spread capacity (PSF) depicts the reaction of an imaging framework to a point
source or point question. A more broad term for the PSF is a framework's motivation reaction,
the PSF being the drive reaction of a centered optical framework. The PSF in numerous settings
can be considered as the expanded blob in a picture that speaks to an uncertain question. In
useful terms it is the spatial space form of the exchange capacity of the imaging framework. It is
a helpful idea in Fourier optics, galactic imaging, restorative imaging, electron microscopy and
other imaging methods, for example, 3D microscopy (like in confocal laser filtering microscopy)
and fluorescence microscopy. The level of spreading (obscuring) of the point protest is a measure
for the nature of an imaging framework. In non-sound imaging frameworks, for example,
fluorescent magnifying instruments, telescopes or optical magnifying instruments, the picture
arrangement process is direct in power and portrayed by straight framework hypothesis. This
implies when two protests An and B are imaged all the while, the outcome is equivalent to the
entirety of the autonomously imaged objects. At the end of the day: the imaging of An is
unaffected by the imaging of B and the other way around, inferable from the non-communicating
property of photons. The picture of an intricate question can then be viewed as a convolution of
the genuine protest and the PSF. Be that as it may, when the distinguished light is rational,
picture development is direct in the perplexing field. Recording the power picture then can
prompt to cancelations or other non-straight impacts.
The steps involved in Lucy Richardson and PSF are as shown below
Step 1: Read Image
Step 2: Simulate a Blur and Noise
This example shows how to use the Lucy-Richardson algorithm to deblur images. It can be used
effectively when the point-spread function PSF (blurring operator) is known, but little or no
information is available for the noise. The blurred and noisy image is restored by the iterative,
accelerated, damped Lucy-Richardson algorithm. The additional optical system (e.g. camera)
characteristics can be used as input parameters to improve the quality of the image restoration.
Read Image:
Simulate a real-life image that could be blurred (e.g., due to camera motion or lack of
focus) and noisy (e.g., due to random disturbances). The example simulates the blur by
convolving a Gaussian filter with the true image (using imfilter). The Gaussian filter then
represents a point-spread function, PSF.
Figure.3.1.2 blurred
The example simulates the noise by adding a Gaussian noise of variance V to the blurred image
(using imnoise). The noise variance V is used later to define a damping parameter of the
algorithm
Restore the blurred and noisy image providing the PSF and using only 5 iterations
(default is 10). The output is an array of the same type as the input image
The subsequent picture changes with every cycle. To research the advancement of the
picture reclamation, you can do the deconvolution in steps: do an arrangement of emphasess, see
the outcome, and afterward continue the cycles from where they were halted. To do as such, the
information picture must be passed as a part of a cell cluster (e.g., begin first arrangement of
emphasess by going in {BlurredNoisy}instead of BlurredNoisy as information picture
parameter). All things considered the yield, luc1_cell, turns into a cell exhibit. The cell yield
comprises of four numeric clusters, where the first is theBlurredNoisy picture, the second is the
reestablished picture of class twofold, the third exhibit is the consequence of the one-preceding
last emphasis, and the fourth cluster is an inward parameter of the iterated set. The second
numeric exhibit of the yield cell-cluster, picture luc1_cell{2}, is indistinguishable to the yield
exhibit of the Step 3, picture luc1, with a conceivable special case of their class (the cell yield
dependably gives the reestablished picture of class twofold).
To continue the cycles, take the yield from the past capacity call, the phone cluster
luc1_cell, and pass it into thedeconvlucy work. Utilize the default number of emphasess
(NUMIT = 10). The reestablished picture is the consequence of a sum of 15 emphasess.
The most recent picture, luc2, is the consequence of 15 cycles. Despite the fact that it is
more honed than the before result from 5 cycles, the picture builds up a "dotted" appearance. The
dots don't relate to any genuine structures (contrast it with the genuine picture), yet rather are the
aftereffect of fitting the commotion in the information too nearly.To control the commotion
intensification, utilize the damping choice by indicating the DAMPAR parameter. DAMPAR
must be of an indistinguishable class from the info picture. The calculation hoses changes in the
model in areas where the distinctions are little contrasted and the clamor. The DAMPAR utilized
here equivalents 3 standard deviations of the commotion. See that the picture is smoother.
Figure.3.1.7 Data
Simulate a Blur :
The case reproduces an obscure of the picture of the stars by making a Gaussian channel,
PSF, and convolving it with the genuine picture. Presently recreate a camera that can just watch
part of the stars' pictures (just the obscure is seen). Make a weighting capacity exhibit, WEIGHT,
that comprises of ones in the focal part of the Blurred picture ("great" pixels, situated inside the
dashed lines) and zeros at the edges ("terrible" pixels - those that don't get the flag)
Figure.3.1.8 Observed
The calculation weights every pixel esteem as indicated by the WEIGHT exhibit while
reestablishing the picture. In our illustration, just the estimations of the focal pixels are utilized
(where WEIGHT = 1), while the "terrible" pixel qualities are avoided from the improvement. Be
that as it may, the calculation can put the flag control into the area of these "awful" pixels, past
the edge of the camera's view. See the precision of the determined star positions
Figure.3.1.9 Restored
deconvlucy can reestablish undersampled picture given a better examined PSF (better by
SUBSMPL times). To recreate the inadequately determined picture and PSF, the case canisters
the Blurred picture and the first PSF, two pixels in one, in every measurement. Reestablish the
undersampled picture, BinnedImage, utilizing the undersampled PSF, BinnedPSF. See that the
luc5 picture recognizes just 3 stars The following case reestablishes the undersampled picture
(BinnedImage), this time utilizing the better PSF (characterized on a SUBSMPL-times better
framework). The reproduced picture (luc6) determines the position of the stars all the more
precisely. Take note of how it circulates control between the two stars in the lower right corner of
the picture. This insights at the presence of two brilliant articles, rather than one, as in the past
rebuilding.
Where x is a visually plausible sharp image, and k is a non negative blur kernel, whose support
is small compared to the image size.
3.3. Process of Image Restoration:
Image restoration is an emerging field of image processing in which the focus is on
recovering an original image from a degraded image. The degraded image can be a result of a
known degradation or unknown degradation. Hence image restoration can be defined as a
process of recovering a sharp image from a degraded image which is blurred by a degradation
function, commonly by a Point Spread Function (PSF).
The process of image restoration includes two sub processes. The first part deals with
degrading the quality of the image by adding blur and noise to an image and the second part
deals with removing noise and blur from the degraded image and recovering the original image.
These two sub processes are named as degradation model and restoration model respectively.
Both these are discussed below.
3.3.1 Degradation model:
In degradation model, the image is blurred using degradation function and additive noise.
The following Figure 1 represents the structure of degradation model
Figure.3.3.2.Restoration Model
CHAPTER 4
DESIGN APPROACH
computational process, but also amplifies noise and introduces the ringing effect. Some
additional methods for ringing reduction are given in it. Thus for the good quality of restored
image, the optimal number of iterations are determined manually fore very image as per the PSF
size.
LRA stands for Lucy Richardson Algorithm which is used for image restoration. It is a non blind
technique of image restoration, used to restore a degraded image that has been degraded by a
known PSF. It is an iterative procedure in which the pixels of the observed image.
The Lucy-Richardson Algorithm is an outstanding iterative technique for the deconvolution of
pictures convolved with a known point spread capacity. It is gotten from a factual perspective as
it focalizes to the most extreme probability arrangement under the condition that the information
take after a Poisson dissemination. This supposition remains constant for pictures distinguished
by a computerized camera. In any case, there are pictures not taking after a Poisson yet rather a
non focal chi-square dispersion. Here an adaption of the Lucy-Richardson calculation to be
utilized for information taking after this likelihood appropriation is appeared. Its application to
mimicked and genuine information from an imaging radar sensor demonstrates its different
preferences of the first calculation. Lucy Richardson is an outstanding calculation utilized for
reestablishing the debased pictures. It is utilized when learning about the sources which have
really corrupted the first picture is known. It gives us a gauge of the first picture.
CHAPTER - 5
SOFTWARE DESCRRITION
5.1 Introduction:
5.1.1 What is matlab:
The name MATLAB stands for MATrix LABoratory. MATLAB was written originally to
provide easy access to matrix software developed by the LINPACK (linear system package)and
EISPACK (Eigen system package) projects.
MATLAB is a high-performance language for technical computing. It integrates
computation, visualization, and programming environment. Furthermore, MATLAB is a
modern programming language environment: it has sophisticated data structures, contains built-
in editing and debugging tools, and supports object-oriented programming. These factors make
MATLAB an excellent tool for teaching and research.
MATLAB has many advantages compared to conventional computer languages (e.g., C,
FORTRAN) for solving technical problems. MATLAB is an interactive system whose basic data
element is an array that does not require dimensioning. The software package has been
commercially available since 1984 and is now considered as a standard tool at most universities
and industries worldwide.
5.1.2 A minimum MATLAB session
The goal of this minimum session (also called starting and exiting sessions) is to learn
therst steps:
How to log on
Invoke MATLAB
Do a few simple calculations
How to quit MATLAB
5.1.3 Starting MATLAB
After logging into your account, you can enter MATLAB by double-clicking on the
MATLAB shortcut icon (MATLAB 7.0.4) on your Windows desktop. When you start MATLAB,
a special window called the MATLAB desktop appears. The desktop is a window that contains
other windows. The major tools within or accessible from the desktop are:
The Command Window
The Command History
The Workspace
The Current Directory
The Help Browser
The Start button
interested in doing some simple calculations. We will assume that you have sucient
understanding of your computer under which MATLAB is being run.
You are now faced with the MATLAB desktop on your computer, which contains the prompt
(>>) in the Command Window. Usually, there are 2 types of prompt:
>> for full version
EDU> for educational version
Note: To simplify the notation, we will use this prompt, >>, as a standard prompt sign, though
our MATLAB version is for educational purpose.
5.1.4 Quitting MATLAB
To end your MATLAB session, type quit in the Command Window, or select File ! Exit
MATLAB in the desktop main menu.
The contents of the workspace persist between the executions of separate commands.
There-fore, it is possible for the results of one problem to have an eect on the next one. To
avoid this possibility, it is a good idea to issue a clear command at the start of each new
independent calculation.The command clear or clear all removes all variables from the
workspace. This frees up system memory. In order to display a list of the variables currently in
the memory,type>> who while, whos will give more details which include size, space allocation,
and class of the variables.
5.2.4Miscellaneous commands
summon seeks the fast rundown data in every capacity for a match. For instance, assume that we
were searching for a capacity to take the opposite of a network. Since MATLAB does not have a
capacity named converse, the order help reverse will deliver nothing. Then again, the order
lookfor converse will create nitty gritty data, which incorporates the capacity of intrigue, inv.
>> lookfor inverse
Note - At this specific time of our study, it is vital to underscore one principle point.
Since MATLAB is a tremendous program; it is difficult to cover every one of the points of
interest of every capacity one by one. Notwithstanding, we will give you data how to get offer
assistance. Here are a few cases:
Use on-line ask for data on a specic work
5.3.1 Introduction
So far in these lab sessions, all the commands were executed in the Command Window.
The problem is that the commands entered in the Command Window cannot be saved and
executed again for several times. Therefore, a dierent way of executing repeatedly commands
with MATLAB is:
1. to create a le with a list of commands,
2. save the le, and
3. run the le.
If needed, corrections or changes can be made to the commands in the le. The les that are used
for this purpose are called script les or scripts for short. This section covers the following
topics:
M-File Scripts
M-File Functions
5.3.2 M-File Scripts
A script file is an external le that contains a sequence of MATLAB statements. Script files have
a filename extension .m and are often called M-files. M-files can be scripts that simply execute a
series of MATLAB statements, or they can be functions that can accept arguments and can
produce one or more outputs.
35
5.3.2.1 Examples
Here are two simple scripts.
Example 1
Consider the system of equations:
x + 2y + 3z = 1
3x + 3y + 4z = 1
2x + 3y + 3z = 2
Find the solution x to the system of equations.
Solution: Use the MATLAB editor to create a le: File ! New ! M-le.
Enter the following statements in the le:
A = [1 2 3; 3 3 4; 2 3 3];
b = [1; 1; 2];
x = A\b
Save the file, for example, example1.m.
Run the file, in the command line, by typing:
>> example1
x=
-0.5000
1.5000
-0.5000
When execution completes, the variables (A, b, and x) remain in the workspace. To see a listing
of them, enter whos at the command prompt.
Note: The MATLAB editor is both a text editor specialized for creating M-les and a graphical
MATLAB debugger. The MATLAB editor has numerous menus for tasks such as saving,
viewing, and debugging. Because it performs some simple checks and also uses color to
dierentiate between various elements of codes, this text editor is recommended as the tool of
choice for writing and editing M-les.
There is another way to open the editor:
36
>> edit
or
>> edit filename.m
to open filename.m.
120
Table 5.3.3.(i): Anatomy of a M-File function
Part no. M-file element Description
(1) Function Dene the function name, and the
denition number and order of input and
line output arguments
(2) H1 line A one line summary description
of the program, displayed when you
request Help
(3) Help text A more detailed description of
the program
(4) Function body Program code that performs
the actual computations
Both functions and scripts can have all of these parts, except for the function denition
line which applies to function only.
In addition, it is important to note that function name must begin with a letter, and must
be no longer than than the maximum of 63 characters. Furthermore, the name of the text le that
you save will consist of the function name with the extension .m. Thus, the above example file
would be factorial.m.
Table 5.3.3.(ii): Dierence between scripts and functions
Scripts Functions
- Do not accept input - Can accept input arguments and
arguments or return output return output arguments.
arguments.
- Store variables in a - Store variables in a workspace workspace that is shared internal
to the function. with other scripts
- Are useful for automating - Are useful for extending the MATLAB
a series of commands language for your application
As mentioned above, the input arguments are listed inside parentheses following the
function name. The output arguments are listed inside the brackets on the left side. They are used
to transfer the output from the function le. The general form looks like this function [outputs] =
function_name(inputs) Function le can have none, one, or several output arguments. Table 4.3
illustrates some possible combinations of input and output arguments.
Table 4.3: Example of input and output arguments
function C=FtoC(F) One input argument and one output argument
function area=TrapArea(a,b,h) Three inputs and one output
function [h,d]=motion(v,angle) Two inputs and two outputs
5.3.5. Output commands
As discussed before, MATLAB automatically generates a display when commands are
exe- cuted. In addition to this automatic display, MATLAB has several commands that can be
used to generate displays or outputs. Two commands that are frequently used to generate output
are: disp and fprintf.
CHAPTER 6
SIMULATION RESULTS
Figure(b):true PSF
Figure(c):blurred image
Figure(d):Preliminary restoration
Figure(e):Preliminary restoration
Figure(f):original image
2.RICHARDSON CODE:
Figure(i):original image
Figure(ii):blurred
3.PSF outputs:
Figure(a):data
Figure(b):observed
Figure(c):binned observed
Figure(d):poor PSF
Figure(e):fine PSF
Figure(f):restored
CHAPTER 7
The results show how to use the Lucy-Richardson algorithm to deblur images. It can be
used effectively when the point-spread function PSF (blurring operator) is known, but little or no
information is available for the noise. The blurred and noisy image is restored by the iterative,
accelerated, damped Lucy-Richardson algorithm.
References
[1] Amandeep Kaur, Vinay Chopra, A comparative study and analysis of image restoration
techniques using different image formats, International Journal of Science and Emerging
Technologies with latest trends, 2, 1, pp. 7-14, 2012.
[2] M.R. Banham and A.K. Katsaggelos,''Digital Image Restoration,''IEEE Signal Processing
Magazine, Vol. 14, No.2, pp.24-41, March 1997.
[4] X. Jiang, D. C. Cheng, et. Al. Motion Deblurring, University of Muenster, Department of
Mathematics and Computer Science, 2005.
[6] G. Li, Y. Ito, et. Al., A discrete wavelet transform based recoverable image processing for
privacy protection, IEEE International Conference on Image Processing, pp. 1372-1375,
October 2008.
[9] M. Bertero and P. Boccacci, A simple method for the reduction of boundary effects in the
Richardson-Lucy approach to image deconvolution,Astronomy and Astrophysics,Vol. 437,pp.
369-374, July 2005.