SlideShare a Scribd company logo
1 of 23
For any Assignment related queries, Call us at : - +1 678 648 4277
You can mail us at : - info@matlabassignmentexperts.com or
reach us at : - https://www.matlabassignmentexperts.com/
matlabassignmentexperts.com
PROBLEM SET
Problem 1: Given a waveform x(t) with a pdf of the form
p(x) = λe−λx x > 0
= 0 otherwise
calculate (a) the mean µx, and (b) the variance
Problem 2: White noise is passed through an ideal low-pass filter with a cut-off
frequency of ωc. Find the autocorrelation function of the filtered noise.
Problem 3: A Mini-project: Deblurring the Hubble Telescope Images
As you know, the scientific world was shocked by the poor quality of the initial
images from the Hubble Space Telescope after its launch April 24, 1990. After it
went into orbit, it became clear that something was wrong. While the pictures
were clearer than those of ground-based telescopes, they were blurry, and not the
Read the Class Handout: Introduction to Two-Dimensional/Image
Processing be fore attempting this mini-project.
matlabassignmentexperts.com
pristine images promised.
The telescope’s primary mirror had been polished with a ”spherical aberration”
flaw. It was just slightly the wrong shape, causing the light that reflected from the
center of the mirror to focus in a different place than the light reflected from the
edge. The tiny flaw about 1/50th the thickness of a sheet of paper, was enough to
seriously degrade the images.
While the problem was well understood, the hardware fix was time consuming and
very expensive. The rest is history, we now look in awe at the images from Hubble.
In this mini-project we are going to use signal processing techniques to deblur
some Hubble images. We provide you with two blurred images, your task is to
sharpen them and restore the full fidelity.
• An gray-scale image can be thought of as a two-dimensional function f(x,y),
where f is the intensity of the image at point x,y in the image.
• A RGB (red-green-blue) colored image can be thought of having three separate
com ponent images (a red fr(x,y), a green fg(x,y), and a blue fb(x,y)) image.
• A digital image is made up of pixels - in our case our images will be 512 × 512
pixels.
matlabassignmentexperts.com
• Many optical distortions, such as blurring, can be thought of as a linear filtering
op eration, with the difference that 1) the functions being filtered are functions of
space (not time), and 2) are two-dimensional.
• An image processing filter has a two-dimensional impulse response, known as the
point spread function h(x,y), reflects how an impulsive point at the center of the
source image is “spread” out in space by the filter.
• The operation of a linear image processing filter is that of 2-D convolution of the
2-D input image with the 2-D point-spread function (see the class handout).
• The two-dimensional Fourier transform is defined (see the class handout), and
anal ogous with 1-D signal processing, the filtering may be done my multiplication
in the Fourier domain, that is
matlabassignmentexperts.com
Y (j u, j v) = F (j u, j v)H(j u, j v)
where F (j u, j v) = F2 {f(x,y)}, Y (j u, j v) = F2 {y(x,y)}, H(j u, j v) = F2 {h(x,y)} is the
image filter’s 2-D frequency response, and u, and v are spatial frequencies with units
of radians/unit length.
Let’s assume that the aberrant mirror in the Hubble telescope has caused the true
image f(x,y) to be blurred by convolution with a known point-spread function h(x,y),
so that the image we are given is g(x,y). The process of recovering f(x,y) is known as
deconvolution, or inverse filtering. In one-dimensional temporal linear processing,
we might do the following:
By definition, the inverse filter has a frequency response of 1/H(j ω) so that F (j ω) is
re covered at its output. While it sounds easy, the process can be fraught with
difficulties, for example if H(s) has zeros on the imaginary axis the gain of the
inverse filter will go to infinity at that frequency. Also inverse filters often tend to
amplify any high frequency noise.
matlabassignmentexperts.com
In the two-dimensional case, if we know the point-spread function h(x,y) that
blurred the image, we can construct the inverse filter 1/H(j u, j v) and use it to
restore the original.
Details of the MATLAB Tools You Might Need:
• There are two blurred Hubble images to deal with. These are contained in the
MAT LAB files blurredimage1.mat, and blurredimage2.mat. Each image is a 512 ×
512 RGB colored image. When loaded into MATLAB the image will be named
blurred in each case (deal with them one at a time). You can view the image with
load blurredimage1;
image(blurred);
• MATLAB has 2-D fft functions fft2() and ifft2(). Don’t forget that you will have
to work on all three color planes in the image.
• The mirror design engineers have told us that the distortion was equivalent to
convolu tion with a Gaussian kernel such as produced by MATLAB’s image
processing toolbox function fspecial():
matlabassignmentexperts.com
hsize=25;
sigma = 3;
h = fspecial(’gaussian’, hsize, sigma);
You might want to use mesh(h) to take a look at it.
If you don’t have access to the Image Processing toolbox, here is how you can
construct the 2-D kernel:
siz = (hsize-1)/2;
[x,y] = meshgrid(-siz(2):siz(2),-siz(1):siz(1));
arg = -(x.*x + y.*y)/(2*sigma*sigma);
h = exp(arg);
sumh = sum(h(:));
h = h/sumh;
Note that the sum of elements is set to unity.
• When you have processed an RGB image and want to display it, the display
function image(myRGBimage) requires that all values be real, positive, and in the
range 0 to 1.
matlabassignmentexperts.com
Do not use the Image Processing Toolbox to solve this problem. We want to see
each step you took in solving the problem. Submit the listing of your MATLAB script
as a .m file, and upload your deblurred images before 1pm on the due date.
Problem 4:
You have probably realized by now that I just love the sound of my own voice! I used
Windows Sound Recorder on my PC to make a recording of me saying “good
morning” so that I can play it to myself each morning when I wake up. It just makes
my day...
Now, here’s the problem. Windows Sound Recorder has a button “Add Echo”, -
which surprisingly adds an echo to a recorded sound. Unfortunately I clicked on this
button before I saved the “.wav” file, and the result is that I sound as if I am
speaking from inside a tin can! I hate that, and I want you to help restore my voice
to its natural beauty.
Your job is to analyze the recorded file to find out exactly how Microsoft added
the echo, and then to remove it.
On the class MIT Server is a Microsoft “.wav” file PS9Prob2.wav that
contains me saying “good morning” to myself. Download the file and load it into
MATLAB using the wavread() function. If your computer has speakers (or
headphones) you can play the sound using the sound() or soundsc() functions. Use
help audio to see the sound handling functions in MATLAB.
matlabassignmentexperts.com
(a) Given a function f(t) with autocorrelation φff (τ ), find an expression for the
autocorre lation function φgg(τ ) of a waveform g(t) where
g(t) = f(t) + αf(t − Δ)
is f(t) contaminated by an echo with delay Δ and amplitude α. Express your
answer in terms of φff (τ).
(b) In the case of a discrete-time signal contaminated by an echo, let
gn = fn + αfn−m.
where m is the echo delay. Express the echo generation as a linear filtering
operation and derive the the transfer function H(z).
Use MATLAB to analyze the .wav file, using the results of part(a), to estimate the
parameters α and m that Microsoft Windows Sound Recorder used to create
the echo in the .wav file.
(c) Using your results from (b), design a digital filter that will eliminate the echo
contami nation from the .wav file. Derive the transfer function, and the
difference equation.
matlabassignmentexperts.com
(d) Use MATLAB to apply your inverse filter to the sound file and show (hopefully)
that it has removed the echo.
Document your process so that we can understand exactly what you did.
matlabassignmentexperts.com
SOLUTION SET
Solution1:
Solution2:
Input f is a white noise with flat spectrum and hence we assume that Φff(jω) = 1.
The output can be computed from:
matlabassignmentexperts.com
Solution3:
The inverse filter for this high-precision problem can be implemented as the
exact inverse of the input filter. We will revisit this problem in the 2nd quiz where
additive noise of quantization imposes some modification to the inverse filter.
Here is the code that we used.
-Note that “h” kernel needs to be zero padded such that that image and h DFT
have the same size. This ensures that their corresponding DFT matrix elements,
correspond to the same (u,v) value and we can multiply them element-wise.
- Note the color scaling at the end. All the color channels are scaled with the same
scale, such that relative RGB pattern is not altered.
matlabassignmentexperts.com
clear all,close all,clc
%% Read in the image
load(’blurredimage2.mat’,’blurred’)
figure,subplot(2,1,1),image(blurred), axis image
title(’Double Precision Input (blurred) Image’)
%% Determine the size of the image supplied
pad = 24;
imsize = size(blurred);
xsize = imsize(1) + pad;ysize = imsize(2) + pad;
% Take fft of image
fftblur = fft2(blurred,xsize,ysize);
%--------------------------------------------
%% Design the inverse filter
% Use a gaussian kernel from the image processing toolbox hsize=25;sigma = 3;
h = fspecial(’gaussian’, hsize, sigma);
ffth = fft2(h,xsize,ysize);
% Create the inverse filter - this is just the simple form:
fftinvh = 1./ffth;
% figure
% mesh(fftshift(abs(fftinvh)))
% title(’Inverse Filter Magnitude’)
%-----------------------------------------------
matlabassignmentexperts.com
%% Filter the image
fftdeblur = zeros(xsize,ysize,3);
for i=1:3 fftdeblur(:,:,i) =
fftinvh.*fftblur(:,:,i);
end
%% Inverse fft and Color Intensity Scaling
deblurred = abs(ifft2(fftdeblur));
% Normalize the pixel intensity for the whole image
% to set all values in the range 0 -- 1 (already all are positive)
maxpix = max(max(max(max(deblurred))),1);
deblurred = deblurred/maxpix;
% Show the image
subplot(2,1,2),image(deblurred), axis image
title(’Double Precision Output (deblurred) Image’)
matlabassignmentexperts.com
matlabassignmentexperts.com
matlabassignmentexperts.com
matlabassignmentexperts.com
matlabassignmentexperts.com
Solution 4:
(a) The autocorrelation of the contaminated signal is
φgg(τ) = E{g(t)g(t+ τ)}
= E{(f(t)+αf(t −Δ))(f(t + τ)+αf(t + τ −Δ))}
= E{(f(t)f(t + τ)}+ E {α2 f(t −Δ)f(t + τ −Δ) } +E{αf(t)f(t + τ
−Δ)}+ E{αf(t+ τ)f(t −Δ)}
and recognizing that φff(τ)does not depend on the time origin,
φgg(τ)=(1+α2)φff(τ)+αφff(τ −Δ)+αφff(τ +Δ)
(b) With the MATLAB code
[f,fs,Nbits] = wavread(’PS9Prob4.wav’);
L = length(f);
figure(1), plot(-(L-1):L-1, xcorr(f,f))
the following plot was annotated using the cursor tip.
matlabassignmentexperts.com
matlabassignmentexperts.com
We assume that φff(0) >> φff(2τ),φff(τ) and then from (a) peaks on the graph
correspond to:
(1 +α2)φff(0) ≈ 57.98 αφff(0) ≈ 15.59
or
α2 − 3.72α +1 = 0
so that α ≈ 0.29. Actually α = 0.3 and we will use α = 0.3 value. Similarly, from the
autocorrelation function m = 1200.
(c) Recognize that Eq. (2) is a filter with H(z) = 1+αz−Δ . Then the inverse filter
H′(z) = 1/H(z) to remove the echo is
which is an IIR filter with a difference equation
fn = −αfn−m + gn.
(d) Below is the complete MATLAB code to implement the filter and filter the data:
[f,fs,Nbits] = wavread(’PS9Prob4.wav’);
L = length(f);
matlabassignmentexperts.com
figure(1), plot(-(L-1):L-1, xcorr(f,f))
title(’Autocorrelation of input data’)
xlabel(’shift’)
ylabel(’phi’)
% Look at the autocorrelation function
wavplay(f,fs)
% Determine that the
delay is 1200 and alpha=0.3 delay = 1200; alpha = 0.3;
% Recursive filter:
% Set up the denominator:
a1 = zeros(1,1201); a1(1) = 1; a1(1201) = alpha;
y = filter(1, a1, f);
figure(2), plot(-(L-1):L-1, xcorr(y,y))
title(’Autocorrelation of processed data (IIR filter)’)
xlabel(’shift’)
ylabel(’phi’)
%
wavplay(f1,fs)
which produced the following output autocorrelation plot
matlabassignmentexperts.com
Note that the echo components have been eliminated.
matlabassignmentexperts.com

More Related Content

Similar to Online Signal Processing Assignment Help

Image Degradation & Resoration
Image Degradation & ResorationImage Degradation & Resoration
Image Degradation & ResorationSanjay Saha
 
MTH 2001 Project 2Instructions• Each group must choos.docx
MTH 2001 Project 2Instructions• Each group must choos.docxMTH 2001 Project 2Instructions• Each group must choos.docx
MTH 2001 Project 2Instructions• Each group must choos.docxgilpinleeanna
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods thanhhoang2012
 
chapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptxchapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptxAyeleFeyissa1
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slidesBHAGYAPRASADBUGGE
 
chAPTER1CV.pptx is abouter computer vision in artificial intelligence
chAPTER1CV.pptx is abouter computer vision in artificial intelligencechAPTER1CV.pptx is abouter computer vision in artificial intelligence
chAPTER1CV.pptx is abouter computer vision in artificial intelligenceshesnasuneer
 
computervision1.pptx its about computer vision
computervision1.pptx its about computer visioncomputervision1.pptx its about computer vision
computervision1.pptx its about computer visionshesnasuneer
 
Image compression
Image compressionImage compression
Image compressionsophiaa
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxanhlodge
 
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)Shajun Nisha
 
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error normRobust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error normTuan Q. Pham
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Varun Ojha
 

Similar to Online Signal Processing Assignment Help (20)

Signals and Systems Homework Help.pptx
Signals and Systems Homework Help.pptxSignals and Systems Homework Help.pptx
Signals and Systems Homework Help.pptx
 
Image Degradation & Resoration
Image Degradation & ResorationImage Degradation & Resoration
Image Degradation & Resoration
 
MTH 2001 Project 2Instructions• Each group must choos.docx
MTH 2001 Project 2Instructions• Each group must choos.docxMTH 2001 Project 2Instructions• Each group must choos.docx
MTH 2001 Project 2Instructions• Each group must choos.docx
 
2. filtering basics
2. filtering basics2. filtering basics
2. filtering basics
 
Point Processing
Point ProcessingPoint Processing
Point Processing
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods
 
Log polar coordinates
Log polar coordinatesLog polar coordinates
Log polar coordinates
 
chapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptxchapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptx
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
www.ijerd.com
www.ijerd.comwww.ijerd.com
www.ijerd.com
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
 
chAPTER1CV.pptx is abouter computer vision in artificial intelligence
chAPTER1CV.pptx is abouter computer vision in artificial intelligencechAPTER1CV.pptx is abouter computer vision in artificial intelligence
chAPTER1CV.pptx is abouter computer vision in artificial intelligence
 
computervision1.pptx its about computer vision
computervision1.pptx its about computer visioncomputervision1.pptx its about computer vision
computervision1.pptx its about computer vision
 
Image compression
Image compressionImage compression
Image compression
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
 
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
 
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error normRobust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
 
point processing
point processingpoint processing
point processing
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)
 

More from Matlab Assignment Experts

🚀 Need Expert MATLAB Assignment Help? Look No Further! 📊
🚀 Need Expert MATLAB Assignment Help? Look No Further! 📊🚀 Need Expert MATLAB Assignment Help? Look No Further! 📊
🚀 Need Expert MATLAB Assignment Help? Look No Further! 📊Matlab Assignment Experts
 

More from Matlab Assignment Experts (20)

🚀 Need Expert MATLAB Assignment Help? Look No Further! 📊
🚀 Need Expert MATLAB Assignment Help? Look No Further! 📊🚀 Need Expert MATLAB Assignment Help? Look No Further! 📊
🚀 Need Expert MATLAB Assignment Help? Look No Further! 📊
 
Matlab Assignment Help
Matlab Assignment HelpMatlab Assignment Help
Matlab Assignment Help
 
Matlab Assignment Help
Matlab Assignment HelpMatlab Assignment Help
Matlab Assignment Help
 
Matlab Assignment Help
Matlab Assignment HelpMatlab Assignment Help
Matlab Assignment Help
 
MAtlab Assignment Help
MAtlab Assignment HelpMAtlab Assignment Help
MAtlab Assignment Help
 
Matlab Assignment Help
Matlab Assignment HelpMatlab Assignment Help
Matlab Assignment Help
 
Matlab Assignment Help
Matlab Assignment HelpMatlab Assignment Help
Matlab Assignment Help
 
Matlab Homework Help
Matlab Homework HelpMatlab Homework Help
Matlab Homework Help
 
MATLAB Assignment Help
MATLAB Assignment HelpMATLAB Assignment Help
MATLAB Assignment Help
 
Matlab Homework Help
Matlab Homework HelpMatlab Homework Help
Matlab Homework Help
 
Matlab Assignment Help
Matlab Assignment HelpMatlab Assignment Help
Matlab Assignment Help
 
Computer vision (Matlab)
Computer vision (Matlab)Computer vision (Matlab)
Computer vision (Matlab)
 
Online Matlab Assignment Help
Online Matlab Assignment HelpOnline Matlab Assignment Help
Online Matlab Assignment Help
 
Modelling & Simulation Assignment Help
Modelling & Simulation Assignment HelpModelling & Simulation Assignment Help
Modelling & Simulation Assignment Help
 
Mechanical Assignment Help
Mechanical Assignment HelpMechanical Assignment Help
Mechanical Assignment Help
 
CURVE FITING ASSIGNMENT HELP
CURVE FITING ASSIGNMENT HELPCURVE FITING ASSIGNMENT HELP
CURVE FITING ASSIGNMENT HELP
 
Design and Manufacturing Homework Help
Design and Manufacturing Homework HelpDesign and Manufacturing Homework Help
Design and Manufacturing Homework Help
 
Digital Image Processing Assignment Help
Digital Image Processing Assignment HelpDigital Image Processing Assignment Help
Digital Image Processing Assignment Help
 
Signals and Systems Assignment Help
Signals and Systems Assignment HelpSignals and Systems Assignment Help
Signals and Systems Assignment Help
 
Signal Processing Assignment Help
Signal Processing Assignment HelpSignal Processing Assignment Help
Signal Processing Assignment Help
 

Recently uploaded

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 

Recently uploaded (20)

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 

Online Signal Processing Assignment Help

  • 1. For any Assignment related queries, Call us at : - +1 678 648 4277 You can mail us at : - info@matlabassignmentexperts.com or reach us at : - https://www.matlabassignmentexperts.com/ matlabassignmentexperts.com
  • 2. PROBLEM SET Problem 1: Given a waveform x(t) with a pdf of the form p(x) = λe−λx x > 0 = 0 otherwise calculate (a) the mean µx, and (b) the variance Problem 2: White noise is passed through an ideal low-pass filter with a cut-off frequency of ωc. Find the autocorrelation function of the filtered noise. Problem 3: A Mini-project: Deblurring the Hubble Telescope Images As you know, the scientific world was shocked by the poor quality of the initial images from the Hubble Space Telescope after its launch April 24, 1990. After it went into orbit, it became clear that something was wrong. While the pictures were clearer than those of ground-based telescopes, they were blurry, and not the Read the Class Handout: Introduction to Two-Dimensional/Image Processing be fore attempting this mini-project. matlabassignmentexperts.com
  • 3. pristine images promised. The telescope’s primary mirror had been polished with a ”spherical aberration” flaw. It was just slightly the wrong shape, causing the light that reflected from the center of the mirror to focus in a different place than the light reflected from the edge. The tiny flaw about 1/50th the thickness of a sheet of paper, was enough to seriously degrade the images. While the problem was well understood, the hardware fix was time consuming and very expensive. The rest is history, we now look in awe at the images from Hubble. In this mini-project we are going to use signal processing techniques to deblur some Hubble images. We provide you with two blurred images, your task is to sharpen them and restore the full fidelity. • An gray-scale image can be thought of as a two-dimensional function f(x,y), where f is the intensity of the image at point x,y in the image. • A RGB (red-green-blue) colored image can be thought of having three separate com ponent images (a red fr(x,y), a green fg(x,y), and a blue fb(x,y)) image. • A digital image is made up of pixels - in our case our images will be 512 × 512 pixels. matlabassignmentexperts.com
  • 4. • Many optical distortions, such as blurring, can be thought of as a linear filtering op eration, with the difference that 1) the functions being filtered are functions of space (not time), and 2) are two-dimensional. • An image processing filter has a two-dimensional impulse response, known as the point spread function h(x,y), reflects how an impulsive point at the center of the source image is “spread” out in space by the filter. • The operation of a linear image processing filter is that of 2-D convolution of the 2-D input image with the 2-D point-spread function (see the class handout). • The two-dimensional Fourier transform is defined (see the class handout), and anal ogous with 1-D signal processing, the filtering may be done my multiplication in the Fourier domain, that is matlabassignmentexperts.com
  • 5. Y (j u, j v) = F (j u, j v)H(j u, j v) where F (j u, j v) = F2 {f(x,y)}, Y (j u, j v) = F2 {y(x,y)}, H(j u, j v) = F2 {h(x,y)} is the image filter’s 2-D frequency response, and u, and v are spatial frequencies with units of radians/unit length. Let’s assume that the aberrant mirror in the Hubble telescope has caused the true image f(x,y) to be blurred by convolution with a known point-spread function h(x,y), so that the image we are given is g(x,y). The process of recovering f(x,y) is known as deconvolution, or inverse filtering. In one-dimensional temporal linear processing, we might do the following: By definition, the inverse filter has a frequency response of 1/H(j ω) so that F (j ω) is re covered at its output. While it sounds easy, the process can be fraught with difficulties, for example if H(s) has zeros on the imaginary axis the gain of the inverse filter will go to infinity at that frequency. Also inverse filters often tend to amplify any high frequency noise. matlabassignmentexperts.com
  • 6. In the two-dimensional case, if we know the point-spread function h(x,y) that blurred the image, we can construct the inverse filter 1/H(j u, j v) and use it to restore the original. Details of the MATLAB Tools You Might Need: • There are two blurred Hubble images to deal with. These are contained in the MAT LAB files blurredimage1.mat, and blurredimage2.mat. Each image is a 512 × 512 RGB colored image. When loaded into MATLAB the image will be named blurred in each case (deal with them one at a time). You can view the image with load blurredimage1; image(blurred); • MATLAB has 2-D fft functions fft2() and ifft2(). Don’t forget that you will have to work on all three color planes in the image. • The mirror design engineers have told us that the distortion was equivalent to convolu tion with a Gaussian kernel such as produced by MATLAB’s image processing toolbox function fspecial(): matlabassignmentexperts.com
  • 7. hsize=25; sigma = 3; h = fspecial(’gaussian’, hsize, sigma); You might want to use mesh(h) to take a look at it. If you don’t have access to the Image Processing toolbox, here is how you can construct the 2-D kernel: siz = (hsize-1)/2; [x,y] = meshgrid(-siz(2):siz(2),-siz(1):siz(1)); arg = -(x.*x + y.*y)/(2*sigma*sigma); h = exp(arg); sumh = sum(h(:)); h = h/sumh; Note that the sum of elements is set to unity. • When you have processed an RGB image and want to display it, the display function image(myRGBimage) requires that all values be real, positive, and in the range 0 to 1. matlabassignmentexperts.com
  • 8. Do not use the Image Processing Toolbox to solve this problem. We want to see each step you took in solving the problem. Submit the listing of your MATLAB script as a .m file, and upload your deblurred images before 1pm on the due date. Problem 4: You have probably realized by now that I just love the sound of my own voice! I used Windows Sound Recorder on my PC to make a recording of me saying “good morning” so that I can play it to myself each morning when I wake up. It just makes my day... Now, here’s the problem. Windows Sound Recorder has a button “Add Echo”, - which surprisingly adds an echo to a recorded sound. Unfortunately I clicked on this button before I saved the “.wav” file, and the result is that I sound as if I am speaking from inside a tin can! I hate that, and I want you to help restore my voice to its natural beauty. Your job is to analyze the recorded file to find out exactly how Microsoft added the echo, and then to remove it. On the class MIT Server is a Microsoft “.wav” file PS9Prob2.wav that contains me saying “good morning” to myself. Download the file and load it into MATLAB using the wavread() function. If your computer has speakers (or headphones) you can play the sound using the sound() or soundsc() functions. Use help audio to see the sound handling functions in MATLAB. matlabassignmentexperts.com
  • 9. (a) Given a function f(t) with autocorrelation φff (τ ), find an expression for the autocorre lation function φgg(τ ) of a waveform g(t) where g(t) = f(t) + αf(t − Δ) is f(t) contaminated by an echo with delay Δ and amplitude α. Express your answer in terms of φff (τ). (b) In the case of a discrete-time signal contaminated by an echo, let gn = fn + αfn−m. where m is the echo delay. Express the echo generation as a linear filtering operation and derive the the transfer function H(z). Use MATLAB to analyze the .wav file, using the results of part(a), to estimate the parameters α and m that Microsoft Windows Sound Recorder used to create the echo in the .wav file. (c) Using your results from (b), design a digital filter that will eliminate the echo contami nation from the .wav file. Derive the transfer function, and the difference equation. matlabassignmentexperts.com
  • 10. (d) Use MATLAB to apply your inverse filter to the sound file and show (hopefully) that it has removed the echo. Document your process so that we can understand exactly what you did. matlabassignmentexperts.com
  • 11. SOLUTION SET Solution1: Solution2: Input f is a white noise with flat spectrum and hence we assume that Φff(jω) = 1. The output can be computed from: matlabassignmentexperts.com
  • 12. Solution3: The inverse filter for this high-precision problem can be implemented as the exact inverse of the input filter. We will revisit this problem in the 2nd quiz where additive noise of quantization imposes some modification to the inverse filter. Here is the code that we used. -Note that “h” kernel needs to be zero padded such that that image and h DFT have the same size. This ensures that their corresponding DFT matrix elements, correspond to the same (u,v) value and we can multiply them element-wise. - Note the color scaling at the end. All the color channels are scaled with the same scale, such that relative RGB pattern is not altered. matlabassignmentexperts.com
  • 13. clear all,close all,clc %% Read in the image load(’blurredimage2.mat’,’blurred’) figure,subplot(2,1,1),image(blurred), axis image title(’Double Precision Input (blurred) Image’) %% Determine the size of the image supplied pad = 24; imsize = size(blurred); xsize = imsize(1) + pad;ysize = imsize(2) + pad; % Take fft of image fftblur = fft2(blurred,xsize,ysize); %-------------------------------------------- %% Design the inverse filter % Use a gaussian kernel from the image processing toolbox hsize=25;sigma = 3; h = fspecial(’gaussian’, hsize, sigma); ffth = fft2(h,xsize,ysize); % Create the inverse filter - this is just the simple form: fftinvh = 1./ffth; % figure % mesh(fftshift(abs(fftinvh))) % title(’Inverse Filter Magnitude’) %----------------------------------------------- matlabassignmentexperts.com
  • 14. %% Filter the image fftdeblur = zeros(xsize,ysize,3); for i=1:3 fftdeblur(:,:,i) = fftinvh.*fftblur(:,:,i); end %% Inverse fft and Color Intensity Scaling deblurred = abs(ifft2(fftdeblur)); % Normalize the pixel intensity for the whole image % to set all values in the range 0 -- 1 (already all are positive) maxpix = max(max(max(max(deblurred))),1); deblurred = deblurred/maxpix; % Show the image subplot(2,1,2),image(deblurred), axis image title(’Double Precision Output (deblurred) Image’) matlabassignmentexperts.com
  • 19. Solution 4: (a) The autocorrelation of the contaminated signal is φgg(τ) = E{g(t)g(t+ τ)} = E{(f(t)+αf(t −Δ))(f(t + τ)+αf(t + τ −Δ))} = E{(f(t)f(t + τ)}+ E {α2 f(t −Δ)f(t + τ −Δ) } +E{αf(t)f(t + τ −Δ)}+ E{αf(t+ τ)f(t −Δ)} and recognizing that φff(τ)does not depend on the time origin, φgg(τ)=(1+α2)φff(τ)+αφff(τ −Δ)+αφff(τ +Δ) (b) With the MATLAB code [f,fs,Nbits] = wavread(’PS9Prob4.wav’); L = length(f); figure(1), plot(-(L-1):L-1, xcorr(f,f)) the following plot was annotated using the cursor tip. matlabassignmentexperts.com
  • 21. We assume that φff(0) >> φff(2τ),φff(τ) and then from (a) peaks on the graph correspond to: (1 +α2)φff(0) ≈ 57.98 αφff(0) ≈ 15.59 or α2 − 3.72α +1 = 0 so that α ≈ 0.29. Actually α = 0.3 and we will use α = 0.3 value. Similarly, from the autocorrelation function m = 1200. (c) Recognize that Eq. (2) is a filter with H(z) = 1+αz−Δ . Then the inverse filter H′(z) = 1/H(z) to remove the echo is which is an IIR filter with a difference equation fn = −αfn−m + gn. (d) Below is the complete MATLAB code to implement the filter and filter the data: [f,fs,Nbits] = wavread(’PS9Prob4.wav’); L = length(f); matlabassignmentexperts.com
  • 22. figure(1), plot(-(L-1):L-1, xcorr(f,f)) title(’Autocorrelation of input data’) xlabel(’shift’) ylabel(’phi’) % Look at the autocorrelation function wavplay(f,fs) % Determine that the delay is 1200 and alpha=0.3 delay = 1200; alpha = 0.3; % Recursive filter: % Set up the denominator: a1 = zeros(1,1201); a1(1) = 1; a1(1201) = alpha; y = filter(1, a1, f); figure(2), plot(-(L-1):L-1, xcorr(y,y)) title(’Autocorrelation of processed data (IIR filter)’) xlabel(’shift’) ylabel(’phi’) % wavplay(f1,fs) which produced the following output autocorrelation plot matlabassignmentexperts.com
  • 23. Note that the echo components have been eliminated. matlabassignmentexperts.com