Two-Dimensional Signal Processing and Image De-noising

Similar documents
Two-Dimensional Signal Processing and Image De-noising

Multidimensional Signal Processing

Discrete Fourier transform (DFT)

Fourier transform. Alejandro Ribeiro. February 1, 2018

Discrete Fourier transform

Chapter 8 The Discrete Fourier Transform

The objective of this LabVIEW Mini Project was to understand the following concepts:

Digital Image Processing

Discrete Time Fourier Transform (DTFT)

Discrete-time signals and systems

Definition. A signal is a sequence of numbers. sequence is also referred to as being in l 1 (Z), or just in l 1. A sequence {x(n)} satisfying

Discrete sines, cosines, and complex exponentials

Transforms and Orthogonal Bases

Signal and Information Processing. Alejandro Ribeiro

DISCRETE FOURIER TRANSFORM

Lecture 27 Frequency Response 2

EE-210. Signals and Systems Homework 7 Solutions

EEL3135: Homework #3 Solutions

Adaptive Systems Homework Assignment 1

ENT 315 Medical Signal Processing CHAPTER 2 DISCRETE FOURIER TRANSFORM. Dr. Lim Chee Chin

The Discrete-time Fourier Transform

Lecture 10, Multirate Signal Processing Transforms as Filter Banks. Equivalent Analysis Filters of a DFT

LAB 6: FIR Filter Design Summer 2011

Interchange of Filtering and Downsampling/Upsampling

Principal Components Analysis

The Continuous-time Fourier

Lecture Notes 1: Vector spaces

EDISP (NWL2) (English) Digital Signal Processing Transform, FT, DFT. March 11, 2015

CMPT 318: Lecture 5 Complex Exponentials, Spectrum Representation

Review of Discrete-Time System

INTRODUCTION TO THE DFS AND THE DFT

Summary of Lecture 5

Final Exam January 31, Solutions

Homework #1 Solution

Digital Signal Processing. Midterm 2 Solutions

The Discrete Fourier Transform

Review: Continuous Fourier Transform

Numerical Methods I Orthogonal Polynomials

Music 270a: Complex Exponentials and Spectrum Representation

6.003: Signal Processing

Fundamentals of the DFT (fft) Algorithms

Module 3. Convolution. Aim

Linear Algebra- Final Exam Review

MA3232 Summary 5. d y1 dy1. MATLAB has a number of built-in functions for solving stiff systems of ODEs. There are ode15s, ode23s, ode23t, ode23tb.

EE16B - Spring 17 - Lecture 12A Notes 1

Orthonormal Bases; Gram-Schmidt Process; QR-Decomposition

Review of Concepts from Fourier & Filtering Theory. Fourier theory for finite sequences. convolution/filtering of infinite sequences filter cascades

Representation of Signals and Systems. Lecturer: David Shiung

Discrete Fourier transform (DFT)

Advanced Digital Signal Processing -Introduction

[ ], [ ] [ ] [ ] = [ ] [ ] [ ]{ [ 1] [ 2]

Introduction to Sparsity in Signal Processing

EE 16B Final, December 13, Name: SID #:

REPRESENTATIONS OF U(N) CLASSIFICATION BY HIGHEST WEIGHTS NOTES FOR MATH 261, FALL 2001

Fourier transform. * The Fourier transform of a function f(x) is defined as

8 The Discrete Fourier Transform (DFT)

Least Squares. Ken Kreutz-Delgado (Nuno Vasconcelos) ECE 175A Winter UCSD

L6: Short-time Fourier analysis and synthesis

Continuous Fourier transform of a Gaussian Function

Computer Vision & Digital Image Processing

6.003 Homework #10 Solutions

Introduction to Sparsity in Signal Processing

Contents. Signals as functions (1D, 2D)

Basics on 2-D 2 D Random Signal

ELEG 305: Digital Signal Processing

Contents. Signals as functions (1D, 2D)

Homework 6 Solutions

UNIT-2: MULTIPLE RANDOM VARIABLES & OPERATIONS

Contents. Signals as functions (1D, 2D)

Ch.11 The Discrete-Time Fourier Transform (DTFT)

Therefore the new Fourier coefficients are. Module 2 : Signals in Frequency Domain Problem Set 2. Problem 1

Aspects of Continuous- and Discrete-Time Signals and Systems

Fourier Methods in Digital Signal Processing Final Exam ME 579, Spring 2015 NAME

DETECTION theory deals primarily with techniques for

Sampling. Alejandro Ribeiro. February 8, 2018

University Question Paper Solution

Voiced Speech. Unvoiced Speech

Chapter 2 Fourier Series Phase Object Spectra

A Brief Introduction to Tensors

FFTs in Graphics and Vision. Homogenous Polynomials and Irreducible Representations

ELEG 305: Digital Signal Processing

Lecture 19: Discrete Fourier Series

Empirical Mean and Variance!

The following definition is fundamental.

3. ESTIMATION OF SIGNALS USING A LEAST SQUARES TECHNIQUE

1 Lecture 8: Interpolating polynomials.

SIMG-782 Digital Image Processing Homework 6

ELEN E4810: Digital Signal Processing Topic 2: Time domain

(i) Represent continuous-time periodic signals using Fourier series

EEO 401 Digital Signal Processing Prof. Mark Fowler

Feature extraction 1

1. Calculation of the DFT

Linear Convolution Using FFT

Linear Models Review

Model-building and parameter estimation

LAB 2: DTFT, DFT, and DFT Spectral Analysis Summer 2011

The Discrete Fourier Transform (DFT) Properties of the DFT DFT-Specic Properties Power spectrum estimate. Alex Sheremet.

IT DIGITAL SIGNAL PROCESSING (2013 regulation) UNIT-1 SIGNALS AND SYSTEMS PART-A

Functional Analysis F3/F4/NVP (2005) Homework assignment 3

z-transforms Definition of the z-transform Chapter

Transcription:

Two-Dimensional Signal Processing and Image De-noising Alec Koppel, Mark Eisen, Alejandro Ribeiro March 14, 2016 Before we considered (one-dimensional) discrete signals of the form x : [0, N 1] C where N is the duration, having elements x(n) for n [0, N 1]. Extend this definition to two dimensions by considering the set of ordered pairs x : [0, M 1] [0, N 1] C x = {x(m, n) : m [0, M 1], n [0, N 1]}. (1) We can think of x as the set of values along the integer lattice in the twodimensional plane, hence as elements of a discrete spatial domain. We associate these signals with the space of complex matrices C M N. The inner product for two signals x and y, both of duration M N, in twodimensions is a natural extension of the one-dimensional case, and is defined as x, y := M 1 m=0 x(m, n)y (m, n). (2) n=0 As before, we define the energy of a two-dimensional signal x as x, x = x 2. We say two signals are orthogonal in two-dimensions if x, y = 0 whenever x = y, and if in addition both vectors have unit energy, i.e. x = y = 1 they are said to be orthonormal. The discrete twodimensional impulse δ(m, n) is defined as { 1 if n = m δ(m, n) = (3) 0 if n = m The discrete complex exponential e kl, (m, n) in two-dimensions at fre- 1

quencies k and l is the signal e kl, (m, n) = 1 e j2πkm/m e j2πln/n = 1 e j2π(km/m+ln/n). (4) It is a straight forward computation to check that e kl, is orthonormal to e pq, for k = p, l = q. The two-dimensional discrete Fourier transform (DFT) of x is the signal X : Z 2 C where the elements X(k, l) for all k, l Z are defined as X(k, l) := 1 M 1 x(m, n)e j2πkm/m e j2πln/n (5) m=0 n=0 The arguments k and l of the signal X(k, l) are called the vertical and horizontal frequency of the DFT and the value X(k, l) the frequency component of the given signal x. As in the one-dimensional case, when X is the DFT of x we write X = F(x). Recall that for a complex exponential, discrete frequency k is equivalent to (real) frequency f k = (k/n) f s, where N is the total number of samples and f s the sampling frequency. An alternative form of the 2d DFT is to realize that the sum in (5) is defining a two-dimensional inner-product between x and the complex exponential e kl, (m, n) with elements e kl, (m, n) = (1/ )e j2π(km/m+ln/n). We can then write X(k, l) := 1 M 1 m=0 ( ) x(m, n)e j2πln/n e j2πkm/m n=0 = 1 M 1 x(m, ), e ln e j2πkm/m M m=0 = x(m, ), e ln, e km = x, e kl, (6) which allows us to view X(k, l) as a measure of how much the signal x resembles an oscillation of frequency k in the vertical direction and l in the horizontal direction. Note that the inner products in the two middle equalities above are scalar, whereas the last is in two dimensions, as may be noted by the bold-face type. Because the complex exponential is (M, N)-periodic, the 2d DFT val- 2

ues X(k, l) and X(k + M, l + N) are equal, i.e., X(k + M, l + N) = 1 M 1 x(m, n)e j2π(k+m)m/m e j2π(l+n)n/n m=0 n=0 = 1 M 1 x(m, n)e j2πkm/m e j2πln/n m=0 n=0 = X(k, l) (7) The relationship in (7) means that the DFT is periodic in in both directions with period M and N respectively, while it is defined for all k, l Z 2, only M N values are different. As in the 1d case, we work with the canonical set of frequencies k, l [0, M 1] [0, N 1] for computational purposes, and the set of frequencies k, l [ M/2, M/2] [ N/2, N/2] for interpretation purposes. This latter canonical set contains (M + 1)(N + 1) frequencies instead of M N. As before, we may shift the values of the 2-d DFT to convert from one canonical set to another using periodicity: X( k, l) = X(M k, N l) (8) for all k, l [ M/2, M/2] [ N/2, N/2]. The operation in (8) is a chop and shift, from which we may recover the DFT values for the canonical set [ M/2, M/2] [ N/2, N/2] from the canonical set [0, M 1] [0, N 1]. Simply chop the frequencies in the box [M/2, M 1] [N/2, N 1] and shift them to the front of the set as in the onedimensional case. For the purposes of this homework, when you are asked to report a DFT, you should report the DFT for the canonical set [ M/2, M/2] [ N/2, N/2]. Further define the 2d inverse Discrete Fourier Transform (2d idft) F 1 (X) as the two-dimensional signal x(m, n) k=0 x(m, n) := 1 M 1 = 1 M/2 X(k, l)e j2πkm/m e j2πln/n l=0 N/2 k= M/2+1 l= N/2+1 X(k, l)e j2πkm/m e j2πln/n (9) The expression in (9) means that any arbitrary signal x in two dimensions may be represented as a sum of oscillations, as in the one dimensional case. Moreover, conjugacy means we can represent the sum (9) with only half as many terms. This means that we can effectively represent signals using only particular DFT coefficients under some conditions. 3

This observation is the foundation of image de-noising and compression methods which are the focus of the this and next week s lab assignments. For the subsequent questions, you may assume that M = N so that signals are of dimension N 2. 1 Two Dimensional Signal Processing 1.1 Inner products and orthogonality. Write down a function that takes as 1.1input Inner two-dimensional products and signals orthogonality x and y and outputs their inner product. Each signal is now defined by N 2 complex numbers. 1.2 Discrete Complex Exponentials. Write down a function that takes 1.2 as input Discrete the frequencies Complex k, l and Exponentials signal duration N and returns three matrices of size N 2, the first of which contains the values of e kl,n and the later two contain its real and imaginary parts. 1.3 Unit Energy 2-D Square Pulse. The two dimensional square pulse 1.3 is defined Unit asenergy 2-D Square Pulse L (m, n) = 1 L 2 if 0 m, n < L, L (m, n) = 0 if m, n L. (10) Write down a function that takes as input the signal duration T, T 0, and sampling frequency f s and outputs the square pulse as an array of size N 2 as well as the N N the signal duration. Plot the two dimensional square pulse for T = 32s, f s = 8Hz, and T 0 =.5. (Use MATLAB s imshow function). 1.4 Two-Dimensional Gaussian Signals. The Gaussian pulse centered 1.4 at µ, when Two-Dimensional t and s are uncorrelated, Gaussian is defined Signals as x(t, s) = e [(t µ)2 +(s µ) 2 ]/(2σ 2). (11) Write down a function which takes as input µ, σ and T s, and outputs the Gaussian pulse in two-dimensions. Recall that as in the one-dimensional case, we sampled t [ 3σ, 3σ] in increments of size T s. Plot the two dimensional Gaussian for µ = 2 and σ = 1. Note how these signals look when projected onto a single dimension. 4

1.5 DFT in two dimensions. Modify your function for the one dimensional DFT in inlabtwo 2 sodimensions that it now computes the DFT of a two-dimensional 1.5 signal. This computation may be expressed in terms of an inner product (written for question 1.2) of the two-dimensional discrete complex exponential (question 1.2). Compute the DFT of a 2d Gaussian pulse with µ = 0 and σ = 2. Plot your results in the two-dimensional plane. 1.6 idft in Two Dimensions. Write down a function which takes as 1.6 input idft a two-dimensional in Two Dimensions signal of duration N 2 and computes its twodimensional idft [cf. (9)]. Exploit conjugacy in your computation so that you only need to take in (N/2) 2 DFT coefficients. Compute the idft associated with the DFT of the Gaussian pulse you computed in the previous question. Plot this signal and compare it with the original Gaussian pulse. 2 Image Filtering and de-noising We may de-noise corrupted images using spatial information about the signal. To do this, we consider the two-dimensional convolution of signals x and y, denoted by x y, and defined as [x y](m, n) := = k= l= M 1 k=0 x(k, l)y(m k, n l) x(k, l)y(m k, n l) (12) l=0 The standard way to perform image de-noising is to convolve the image with a Gaussian pulse. To implement this technique, start by defining the Gaussian pulse associated with a 2-D signal x as G σ (x) = 1 2πσ 2 e x 2 2σ 2 (13) where x 2 = x, x. With two-dimensional signal (image) x the spatial de-noising technique we consider is x de-noised = G σ x. (14) 5

2.1 Spatial De-noising. Implement the technique in (14) without using 2.1 the 2-DSpatial DFT byde-noising convolving the image with the Gaussian pulse directly. Hint: MATLAB has a built in function to perform the convolution in two dimensions. Try your implementation in the spatial domain out for σ = 1, 4, 16 on sample images A and B. Do you observe significant denoising performance differences when varying σ? 6