Figure('units','normalized','position',[0 0 1 1.5]); N=8; n=0:N-1; % sinusoid x = [1 0 -1 0 1 0 -1 0]'; disp('x, sinusoid') x subplot(311) stem(n,x,'b','Marker','none','LineWidth',2);

Slides:



Advertisements
Similar presentations
DFT properties Note: it is important to ensure that the DFTs are the same length If x1(n) and x2(n) have different lengths, the shorter sequence must be.
Advertisements

Chapter 11 Signal Processing with Wavelets. Objectives Define and illustrate the difference between a stationary and non-stationary signal. Describe the.
>> n=-50:50; wc=0.4*pi; >> hn=sinc(n*wc/pi)*wc/pi; >> stem(n,hn); title('Ideal LPF with cutoff frequency = 0.4 \pi')
EE313 Linear Systems and Signals Fall 2010 Initial conversion of content to PowerPoint by Dr. Wade C. Schwartzkopf Prof. Brian L. Evans Dept. of Electrical.
EE 4780 Bilateral Filter. Bahadir K. Gunturk2 Bilateral Filter Intensity (range) proximity Spatial (domain) proximity N is a fixed value used to define.
EE513 Audio Signals and Systems Digital Signal Processing (Synthesis) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Let’s go back to this problem: We take N samples of a sinusoid (or a complex exponential) and we want to estimate its amplitude and frequency by the FFT.
Windowing Purpose: process pieces of a signal and minimize impact to the frequency domain Using a window – First Create the window: Use the window formula.
Block Convolution: overlap-save method  Input Signal x[n]: arbitrary length  Impulse response of the filter h[n]: lenght P  Block Size: N  we take.
Filter implementation of the Haar wavelet Multiresolution approximation in general Filter implementation of DWT Applications - Compression The Story of.
Multimedia communications EG 371Dr Matt Roach Multimedia Communications EG 371 and EE 348 Dr Matt Roach Lecture 6 Image processing (filters)
Prof. Ramin Zabih (CS) Prof. Ashish Raj (Radiology) CS5540: Computational Techniques for Analyzing Clinical Data.
Lecture 4 Linear Filters and Convolution
Chapter 8: The Discrete Fourier Transform
Signal Processing of Germanium Detector Signals
Wavelet Transform A very brief look.
Filters and Edges. Zebra convolved with Leopard.
Signal Processing of Germanium Detector Signals David Scraggs University of Liverpool UNTF 2006.
Announcements Send to the TA for the mailing list For problem set 1: turn in written answers to problems 2 and 3. Everything.
Discrete Fourier Transform(2) Prof. Siripong Potisuk.
Discrete-Time Convolution Linear Systems and Signals Lecture 8 Spring 2008.
Image Filtering. Problem! Noise is a problem, even in images! Gaussian NoiseSalt and Pepper Noise.
FILTERING GG313 Lecture 27 December 1, A FILTER is a device or function that allows certain material to pass through it while not others. In electronics.
Systems: Definition Filter
Chapter 8 Correlation and Auto-Correlation of Signals.
Digital Signals and Systems
IIS for Image Processing Michael J. Watts
The Convolution Integral
Basis beeldverwerking (8D040) dr. Andrea Fuster Prof.dr. Bart ter Haar Romeny dr. Anna Vilanova Prof.dr.ir. Marcel Breeuwer Convolution.
EE Audio Signals and Systems Digital Signal Processing (Synthesis) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Technion, CS department, SIPC Spring 2014 Tutorials 12,13 discrete signals and systems 1/39.
Spatial Filtering (Applying filters directly on Image) By Engr. Muhammad Saqib.
October 7, 2014Computer Vision Lecture 9: Edge Detection II 1 Laplacian Filters Idea: Smooth the image, Smooth the image, compute the second derivative.
Lecture#10 Spectrum Estimation
Graphing Scaling Functions and Wavelets (Also check out Sweldens’ Applet) Jyun-Ming Chen Spring 2001.
Sejong Univ. CH3. Area Processes Convolutions Blurring Sharpening Averaging vs. Median Filtering.
Summary of Widowed Fourier Series Method for Calculating FIR Filter Coefficients Step 1: Specify ‘ideal’ or desired frequency response of filter Step 2:
Adding and Subtracting Decimals Intro to Algebra.
Non-Linear Transformations Michael J. Watts
CSE 185 Introduction to Computer Vision Image Filtering: Spatial Domain.
Filters– Chapter 6. Filter Difference between a Filter and a Point Operation is that a Filter utilizes a neighborhood of pixels from the input image to.
بسم الله الرحمن الرحيم Digital Signal Processing Lecture 14 FFT-Radix-2 Decimation in Frequency And Radix -4 Algorithm University of Khartoum Department.
Basic Principles Photogrammetry V: Image Convolution & Moving Window:
Lecture 1.29 Correlation analysis of non-periodic signals.
Signal Processing First
Basis beeldverwerking (8D040) dr. Andrea Fuster dr. Anna Vilanova Prof
Lect2 Time Domain Analysis
Digital Signal Processing Lecture 4 DTFT
Linear Prediction Simple first- and second-order systems
FFT-based filtering and the
IIS for Image Processing
Math 3360: Mathematical Imaging
CS-565 Computer Vision Nazar Khan Lecture 4.
Rectangular Coordinates;
The Use of Wavelet Filters to De-noise µPET Data
Computer Vision Lecture 9: Edge Detection II
Shape Analysis and Retrieval
Dr. Chang Shu COMP 4900C Winter 2008
UNIT V Linear Time Invariant Discrete-Time Systems
Quadrature Amplitude Modulation (QAM) Transmitter
APPLICATION of the DFT: Convolution of Finite Sequences.
Lecture 17 DFT: Discrete Fourier Transform
Finite Wordlength Effects
Lecture: Image manipulations (2) Filters and kernels
Digital Image Processing Week IV
Non-local Means Filtering
What do you think will be the values of y?
9.4 Enhancing the SNR of Digitized Signals
Edge Detection in Computer Vision
Lecture 7 Spatial filtering.
Presentation transcript:

figure('units','normalized','position',[ ]); N=8; n=0:N-1; % sinusoid x = [ ]'; disp('x, sinusoid') x subplot(311) stem(n,x,'b','Marker','none','LineWidth',2); %axis([1 N ]) title('x, sinusoid','fontsize',18) % ramp h = [ ]'; disp('h, ramp') h subplot(312) stem(n,h,'b','Marker','none','LineWidth',2); %axis([1 N ]) title('h, ramp','fontsize',18) figure('units','normalized','position',[ ]); N=8; n=0:N-1; % sinusoid x = [ ]'; disp('x, sinusoid') x subplot(311) stem(n,x,'b','Marker','none','LineWidth',2); %axis([1 N ]) title('x, sinusoid','fontsize',18) % ramp h = [ ]'; disp('h, ramp') h subplot(312) stem(n,h,'b','Marker','none','LineWidth',2); %axis([1 N ]) title('h, ramp','fontsize',18) % circularly convolve y = cconv(x,h,N); subplot(313) stem(n,y,'b','Marker','none','LineWidth',2); %axis([1 N ]) title('y, circular convolution','fontsize',18) % circularly convolve y = cconv(x,h,N); subplot(313) stem(n,y,'b','Marker','none','LineWidth',2); %axis([1 N ]) title('y, circular convolution','fontsize',18) Circular convolution of ramp and sinusoid

% pulse x = [ ]'; disp('pulse') x % convolve pulse with itself y = conv(x,x); disp('convo of pulse with itself') y % note the lengths of x and y disp('length of x'); length(x) disp('length of y'); length(y) % zero pad x to make the pulse the same length as y for more clear plotting x(length(y)) = 0; n = 0:length(y)-1; figure('units','normalized','position',[ ]); subplot(211) stem(n,x,'b','Marker','none','LineWidth',2);a xis([ ]); title('pulse','fontsize',18) % pulse x = [ ]'; disp('pulse') x % convolve pulse with itself y = conv(x,x); disp('convo of pulse with itself') y % note the lengths of x and y disp('length of x'); length(x) disp('length of y'); length(y) % zero pad x to make the pulse the same length as y for more clear plotting x(length(y)) = 0; n = 0:length(y)-1; figure('units','normalized','position',[ ]); subplot(211) stem(n,x,'b','Marker','none','LineWidth',2);a xis([ ]); title('pulse','fontsize',18) subplot(212) stem(n,y,'b','Marker','none','LineWidth',2); title('pulse * pulse','fontsize',18) subplot(212) stem(n,y,'b','Marker','none','LineWidth',2); title('pulse * pulse','fontsize',18) Convolve a rectangular pulse with itself

close all; clear all; clc figure('units','normalized','position',[ ]); % piecewise smooth signal N = 50; n = 0:N-1; s = hamming(N).* [ones(N/2,1); - ones(N/2,1)]; subplot(221) stem(s,'b','Marker','none','LineWidth',2); axis([1 N ]) title('piecewise smooth signal','fontsize',18) % add noise to the signal x = s + 0.1*randn(N,1); subplot(222) stem(x,'b','Marker','none','LineWidth',2); axis([1 N ]) title('piecewise smooth signal + noise','fontsize',18) close all; clear all; clc figure('units','normalized','position',[ ]); % piecewise smooth signal N = 50; n = 0:N-1; s = hamming(N).* [ones(N/2,1); - ones(N/2,1)]; subplot(221) stem(s,'b','Marker','none','LineWidth',2); axis([1 N ]) title('piecewise smooth signal','fontsize',18) % add noise to the signal x = s + 0.1*randn(N,1); subplot(222) stem(x,'b','Marker','none','LineWidth',2); axis([1 N ]) title('piecewise smooth signal + noise','fontsize',18) % construct moving average filter impulse response of length M M=16; h = ones(M,1)/M; h1 = h; % Zero pad to let both have the same length h1(N)=0; subplot(224) stem(h1,'b','Marker','none','LineWidth',2); axis([1 N 0 1]) title('impulse response','fontsize',18) % convolve noisy signal with impulse response y = conv(x,h); subplot(223) stem(y(M/2:N+M/2- 1),'b','Marker','none','LineWidth',2); axis([1 N ]) title('output','fontsize',18) % construct moving average filter impulse response of length M M=16; h = ones(M,1)/M; h1 = h; % Zero pad to let both have the same length h1(N)=0; subplot(224) stem(h1,'b','Marker','none','LineWidth',2); axis([1 N 0 1]) title('impulse response','fontsize',18) % convolve noisy signal with impulse response y = conv(x,h); subplot(223) stem(y(M/2:N+M/2- 1),'b','Marker','none','LineWidth',2); axis([1 N ]) title('output','fontsize',18) Using convolution for Denoising a piecewise smooth signal

figure('units','normalized','position',[ ]); % piecewise smooth signal with a bit of noise added N = 50; n = 0:N-1; s = hamming(N).* [ones(N/2,1); -ones(N/2,1)]; x = s + 0.1*randn(N,1); subplot(311) stem(x,'b','Marker','none','LineWidth',2); axis([1 N ]) title('noisy piecewise smooth signal','fontsize',18) % haar wavelet edge detector w = (1/4)*[-ones(2,1); ones(2,1)]; M = length(w); w1 = w; w1(N)=0; subplot(312) stem(w1,'b','Marker','none','LineWidth',2); axis([1 N ]) title('Haar wavelet edge detector','fontsize',18) figure('units','normalized','position',[ ]); % piecewise smooth signal with a bit of noise added N = 50; n = 0:N-1; s = hamming(N).* [ones(N/2,1); -ones(N/2,1)]; x = s + 0.1*randn(N,1); subplot(311) stem(x,'b','Marker','none','LineWidth',2); axis([1 N ]) title('noisy piecewise smooth signal','fontsize',18) % haar wavelet edge detector w = (1/4)*[-ones(2,1); ones(2,1)]; M = length(w); w1 = w; w1(N)=0; subplot(312) stem(w1,'b','Marker','none','LineWidth',2); axis([1 N ]) title('Haar wavelet edge detector','fontsize',18) % convolve noisy signal with impulse response y = conv(x,w); subplot(313) stem(y(M/2:N+M/2- 1),'b','Marker','none','LineWidth',2); axis([1 N ]) title('output','fontsize',18) % convolve noisy signal with impulse response y = conv(x,w); subplot(313) stem(y(M/2:N+M/2- 1),'b','Marker','none','LineWidth',2); axis([1 N ]) title('output','fontsize',18) Using convolution for Edge detection