Digital Image and Fourier Transform

Similar documents
Audio Processing Exercise

4.4 The FFT and MATLAB

ECE438 - Laboratory 4: Sampling and Reconstruction of Continuous-Time Signals

Transform Coding of Still Images

1 Overview. 1.1 Digital Images GEORGIA INSTITUTE OF TECHNOLOGY. ECE 2026 Summer 2018 Lab #5: Sampling: A/D and D/A & Aliasing

Lab 5 Linear Predictive Coding

CURIE Day 3: Frequency Domain Images

1 Overview. 1.1 Digital Images GEORGIA INSTITUTE OF TECHNOLOGY. ECE 2026 Summer 2016 Lab #6: Sampling: A/D and D/A & Aliasing

Lab experience 1: Introduction to LabView

EE-217 Final Project The Hunt for Noise (and All Things Audible)

Laboratory Assignment 3. Digital Music Synthesis: Beethoven s Fifth Symphony Using MATLAB

DATA COMPRESSION USING THE FFT

Problem Set #1 Problem Set Due: Friday, April 12

Calibrate, Characterize and Emulate Systems Using RFXpress in AWG Series

Upgrading E-learning of basic measurement algorithms based on DSP and MATLAB Web Server. Milos Sedlacek 1, Ondrej Tomiska 2

Using Multiple DMs for Increased Spatial Frequency Response

FFT Laboratory Experiments for the HP Series Oscilloscopes and HP 54657A/54658A Measurement Storage Modules

Spectrum Analyser Basics

The Effect of Plate Deformable Mirror Actuator Grid Misalignment on the Compensation of Kolmogorov Turbulence

Joseph Wakooli. Designing an Analysis Tool for Digital Signal Processing

USING MATLAB CODE FOR RADAR SIGNAL PROCESSING. EEC 134B Winter 2016 Amanda Williams Team Hertz

PS User Guide Series Seismic-Data Display

Communication Theory and Engineering

Department of Electrical & Electronic Engineering Imperial College of Science, Technology and Medicine. Project: Real-Time Speech Enhancement

CZT vs FFT: Flexibility vs Speed. Abstract

Course Web site:

System Identification

GG450 4/12/2010. Today s material comes from p in the text book. Please read and understand all of this material!

The Effect of Time-Domain Interpolation on Response Spectral Calculations. David M. Boore

Experiment 2: Sampling and Quantization

Removing the Pattern Noise from all STIS Side-2 CCD data

AN INTEGRATED MATLAB SUITE FOR INTRODUCTORY DSP EDUCATION. Richard Radke and Sanjeev Kulkarni

LabView Exercises: Part II

Chapter 1. Introduction to Digital Signal Processing

Region Based Laplacian Post-processing for Better 2-D Up-sampling

Multirate Signal Processing: Graphical Representation & Comparison of Decimation & Interpolation Identities using MATLAB

Multirate Digital Signal Processing

10 Visualization of Tonal Content in the Symbolic and Audio Domains

Experiments on musical instrument separation using multiplecause

Research on sampling of vibration signals based on compressed sensing

GPA for DigitalMicrograph

Multichannel Satellite Image Resolution Enhancement Using Dual-Tree Complex Wavelet Transform and NLM Filtering

Extraction Methods of Watermarks from Linearly-Distorted Images to Maximize Signal-to-Noise Ratio. Brandon Migdal. Advisors: Carl Salvaggio

Adaptive Resampling - Transforming From the Time to the Angle Domain

2. AN INTROSPECTION OF THE MORPHING PROCESS

Single Channel Speech Enhancement Using Spectral Subtraction Based on Minimum Statistics

An Effective Filtering Algorithm to Mitigate Transient Decaying DC Offset

E E Introduction to Wavelets & Filter Banks Spring Semester 2009

ECE 45 Homework 2. t x(τ)dτ. Problem 2.2 Find the Bode plot (magnitude and phase) and label all critical points of the transfer function

חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור קורס גרפיקה ממוחשבת 2009/2010 סמסטר א' Image Processing

StaMPS Persistent Scatterer Exercise

Digital Signal. Continuous. Continuous. amplitude. amplitude. Discrete-time Signal. Analog Signal. Discrete. Continuous. time. time.

Automatic LP Digitalization Spring Group 6: Michael Sibley, Alexander Su, Daphne Tsatsoulis {msibley, ahs1,

Swept-tuned spectrum analyzer. Gianfranco Miele, Ph.D

Generating Spectrally Rich Data Sets Using Adaptive Band Synthesis Interpolation

UNIVERSITY OF BAHRAIN COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

Realizing Waveform Characteristics up to a Digitizer s Full Bandwidth Increasing the effective sampling rate when measuring repetitive signals

Suverna Sengar 1, Partha Pratim Bhattacharya 2

EE369C: Assignment 1

DHANALAKSHMI COLLEGE OF ENGINEERING Tambaram, Chennai

Figure 1: Feature Vector Sequence Generator block diagram.

Clock Jitter Cancelation in Coherent Data Converter Testing

Agilent PN Time-Capture Capabilities of the Agilent Series Vector Signal Analyzers Product Note

ECE438 - Laboratory 1: Discrete and Continuous-Time Signals

DIGITAL COMMUNICATION

Sampling. Sampling. CS 450: Introduction to Digital Signal and Image Processing. Bryan Morse BYU Computer Science

PROCESSING YOUR EEG DATA

USING MICROPHONE ARRAYS TO RECONSTRUCT MOVING SOUND SOURCES FOR AURALIZATION

What s New in Raven May 2006 This document briefly summarizes the new features that have been added to Raven since the release of Raven

CSE 166: Image Processing. Overview. Representing an image. What is an image? History. What is image processing? Today. Image Processing CSE 166

StaMPS Persistent Scatterer Practical

Getting Started with the LabVIEW Sound and Vibration Toolkit

Precise Digital Integration of Fast Analogue Signals using a 12-bit Oscilloscope

hit), and assume that longer incidental sounds (forest noise, water, wind noise) resemble a Gaussian noise distribution.

Lecture 1: What we hear when we hear music

Hands-on session on timing analysis

Table of Contents. function OneD_signal_Filter_Ex

Normalization Methods for Two-Color Microarray Data

Time series analysis

Design of Speech Signal Analysis and Processing System. Based on Matlab Gateway

ONE SENSOR MICROPHONE ARRAY APPLICATION IN SOURCE LOCALIZATION. Hsin-Chu, Taiwan

Digital Turntable Setup Documentation

Investigation of Digital Signal Processing of High-speed DACs Signals for Settling Time Testing

Torsional vibration analysis in ArtemiS SUITE 1

NENS 230 Assignment #2 Data Import, Manipulation, and Basic Plotting

EE 261 The Fourier Transform and its Applications Fall 2007 Problem Set Two Due Wednesday, October 10

CHAPTER 2 SUBCHANNEL POWER CONTROL THROUGH WEIGHTING COEFFICIENT METHOD

Politecnico di Torino HIGH SPEED AND HIGH PRECISION ANALOG TO DIGITAL CONVERTER. Professor : Del Corso Mahshid Hooshmand ID Student Number:

Chapter 6. Normal Distributions

Chapter 6: Real-Time Image Formation

Sampling Issues in Image and Video

DATA! NOW WHAT? Preparing your ERP data for analysis

Experiment 13 Sampling and reconstruction

Please feel free to download the Demo application software from analogarts.com to help you follow this seminar.

Supplementary Course Notes: Continuous vs. Discrete (Analog vs. Digital) Representation of Information

Fourier Transforms 1D

The following exercises illustrate the execution of collaborative simulations in J-DSP. The exercises namely a

The effect of nonlinear amplification on the analog TV signals caused by the terrestrial digital TV broadcast signals. Keisuke MUTO*, Akira OGAWA**

WE treat the problem of reconstructing a random signal

Speech and Speaker Recognition for the Command of an Industrial Robot

Transcription:

Lab 5 Numerical Methods TNCG17 Digital Image and Fourier Transform Sasan Gooran (Autumn 2009)

Before starting this lab you are supposed to do the preparation assignments of this lab. All functions and files you might need during this lab can be found under: www.itn.liu.se/~sasgo/tncg17/files/lab5 1. Variable types: Input image Campus.tif using imread and name it myimage1. Display the image by imshow. Normalize the image by means of division by 255 and name the result myimage2. Why 255? Display myimage2 using imshow(myimage2) and imshow(double(myimage2)) in two different windows. What happens? Run the following commands in Matlab and contemplate what the commands do. >> myimage=imread( Campus.tif ); >> myimage=double(myimage)/255; >> myimage1=myimage(1:2:end,1:2:end); >> imshow(myimage1) >> imshow(myimage1(:)) >> myimage2=myimage; >> myimage2(100:200,200:400)=1; >> imshow(myimage2) >> myimage3=myimage(1:3:end,1:4:end); >> imshow(myimage3) 2. Downsample and Upsample Input the image Campus.tif. Convert the image to double and normalize it. Downsample the image by taking every second row and column. Upsample

the downsampled image to its original size by imresize. Use all three options for interpolation and discuss the differences in results. 3. Rotation Input the image Campus.tif. Convert the image to double and normalize it. Function imrotate can be used to rotate the image. Check the size of the rotated image and compare it with the size of the original image. Is your calculation in preparation assignment correct? Use different interpolation methods and discuss differences in results. 4. Convolution 4.1 Input the image Campus.tif. Convert the image to double and normalize it. Use function conv2, which performs the two dimensional convolution, and filter the image by following filter. filter1=ones(5)/25. (this is an averaging filter). What does this filter do? 4.2 Input the image Campus.tif and normalize and name it c. Add some white noise to this image by: >> cr = c + (rand(size(c)) 0.5)*0.25; Try to understand what the above command does. Display cr. You can clearly see that cr is a noisy image. Reduce the noise by filtering cr by the filter in assignment 4.1. Any improvement?

Change the size of the filter (both decrease and increase) and see how these changes affect the results. Your comments: 5. Fourier Transform Function fft2 finds the two dimensional discrete Fourier transform of an image. The result is a matrix the same size as the digital image. The result at frequency (0, 0) is put at position (1, 1). In order to move this frequency to the center of the Fourier spectrum you can use fftshift. Functions abs and angle can be used to find the magnitude and the phase of a matrix with complex elements. The two dimensional inverse Fourier transform is performed by ifft2. 5.1 Frequency In order to understand one of the common uses of Fourier transform, which is to find the frequency components of a signal buried in noisy spatial domain signal, run the following commands in Matlab. Create a two dimensional mesh by: >> [X,Y]=meshgrid([0:0.01:1],[0:0.01:1]); Both X and Y are now 101 x 101 matrices with elements varying from 0 to 1 with a step of 0.01. Here we use the function surf to plot a number of simple two dimensional signals. >> surf(x,y,ones(101)) >> surf(x,y,rand(101)) >> surf(x,y,sin(2*pi*x)) >> surf(x,y,sin(2*pi*y)) >> surf(x,y,sin(2*pi*(x+y))) >> surf(x,y,sin(2*pi*(x))+sin(2*pi*y)) Make sure that you understand the commands above and continue!

We now create a sinusoid signal containing two main frequencies, one with an amplitude of 0.8 and the other one with 1, >> z=sin(2*pi*(4*(x)))+0.8*cos(2*pi*(10*x)); >> surf(x,y,z) By plotting the magnitude of the two dimensional Fourier transform of this signal, named Z, you can clearly see the main frequencies that the signal contains, >> surf(x,y,abs(z)) Please have a look at the amplitude. How can you find the right amplitude of each frequency from the Fourier plot? Now we corrupt the signal with a zero-mean random noise. >> zr=z+2*(rand(size(x))-0.5); >> surf(x,y,zr) As you can see it is really hard to see the main frequencies of the original signal here. We now go to the Fourier domain, >> Zr=fftshift(fft2(zr)); >> surf(x,y,abs(zr)) As you see the two frequency components are easy to find in the Fourier domain. You can also find their amplitudes. Your explanation on what you learned from these exercises:.

5.2 Bandwidth Define a signal equal to one in Matlab and calculate its Fourier transform by, >> [X,Y]=meshgrid([0:0.01:1],[0:0.01:1]); >> o1=ones(101); >> O1=fftshift(fft2(o1)); Plot both the signal and its Fourier transform by: >> surf(x,y,o1) >> figure >> surf(x,y,abs(o1)) As you might have noticed the signal in the spatial domain is wide and its Fourier transform on the other hand is narrow. That is always true that the wider the signal the narrower its Fourier transform, and vice versa. Make sure that you understand this fact by studying o2 and o3 below and their respective Fourier transform. >> o2=zeros(101); >> o2(41:61,41:61)=1; >> o3=zeros(101); >> o3(21:81,21:81)=1; Which signal above is wider? Which Fourier transform is narrower? 5.3 Mean Value In the preparation assignments you showed that the mean (or the sum) of the elements in the digital image equals its Fourier transform at frequency (0, 0). Verify that by an example. (You can verify that by using an image, or simply create your own matrix that doesn t necessarily need to be large)

5.4 Real Digital Images In the preparation assignments you showed that the magnitude and the phase of a real image is symmetric and antisymmetric around frequency (0, 0), respectively. Verify that with at least one real matrix (image). 5.5 Convolution Convolution in the spatial domain is equivalent with multiplication in the Fourier domain. Verify that by performing the filtering in assignment 4.1 in the Fourier domain. You must show that your result obtained here are exactly equal to that obtained previously in assignment 4.1.