Title: Image (and Video) Coding and Processing Lecture 2: Basic Filtering
1Image (and Video) Coding and ProcessingLecture
2 Basic Filtering
2Lecture Overview
- Todays lecture will focus on
- Review of 1-D Signals
- Multidimensional signals
- Fourier analysis
- Multidimensional Z-transforms
- Multidimensional Filters
31-D Discrete Time Signals
- A one-dimensional discrete time signal is a
function x(n) - The Z-transform of x(n) is given by
- The Z-transform is not guaranteed to exist
because the summation may not converge for
arbitrary values of z. - The region where the summation converges is the
Region of Convergence - Example If U(n) is the unit step sequence, an
x(n)anU(n), then
41-D Discrete Time Signals, pg. 2
- If the ROC includes the unit circle, then there
is a discrete Fourier transform (found by
evaluating at zejw) - The inverse transform is given by
- Observe The DFT is defined in terms of radians!
It is therefore periodic with period 2p! - Parseval/Plancherel Relationship
51-D Discrete Time Signals, pg. 3
- Discrete time linear, time-invariant systems are
characterized by the impulse response h(n), which
define the relationship between input x(n) and
output y(n) - This is convolution, and is expressed in the
transform domain as - Causality A discrete-time system is causal if
the output at time n does not depend on any
future values of the input sequence. This
requires that
61-D Filters
- The impulse response for a system is also called
the systems transfer function. - In general, transfer functions are of the form
- A system is a finite impulse response (FIR)
system if H(z)A(z), i.e. we can remove the
denominator B(z) - That is, the impulse response has a finite amount
of terms. - An infinite impulse response system is one where
H(z) has an infinite amount of non-zero terms. - Example of an IIR system
71-D Filters, pg. 2
- A discrete-time system is said to be bounded
input bounded output (BIBO stable), if every
input sequence that is bounded produces an output
sequence that is bounded. - For LTI systems, BIBO stability is equivalent to
- Stability in terms of the poles of H(z)
- If H(z) is rational, and h(n) is causal, then
stability is equivalent to all of the poles of
H(z) lying inside of the unit circle
8Sampling From Continuity to Discrete
- The real world is a world of continuous (analog)
signals, whether it is sound or light. - To process signals we will need sampled
discrete-time signals - Analog signals xa(t) have Fourier transform pairs
- Let us define the sampled function x(n)xa(nT).
The Fourier transforms are related as - (Note This is a good, little homework problem
will be assigned!)
9Sampling From Continuity to Discrete
- The effect of the sampling in the frequency
domain is essentially - Duplication of Xa(W) at intervals of 2p/T
- Addition of these copies
- Pictorially, we have something like the
following - Note If the shifted copies overlap, then its
impossible to recover the original signal from
X(w).
1/T Xa(W)
Shifted Copies
Aliasing
10Sampling From Continuity to Discrete, pg. 2
- Aliasing occurs when there is overlap between the
shifted copies - To prevent aliasing, and ensure recoverability,
we can apply an anti-aliasing filter to ensure
there is no overlap. - The overlap-free condition amounts to ensuring
that - If ,
then we say that xa(t) is W-bandlimited. - As a consequence of the overlap-free condition,
if we sample at a rate at least W, then we can
avoid aliasing. - This is, essentially, Shannons sampling theorem.
11Multidimensional signals
- A D-dimensional signal xa(t0,t1,,tD-1) is a
function of D real variables. - We will often denote this as xa(t), where the
bold-faced t denotes the column vector tt0, t1,
, tD-1T. - The subscript a is just used to denote the
analog signal. Later, we shall use the subscript
s to denote the sampled signal, or no subscript
at all. - The Fourier transform of xa(t) is defined by
12Multidimensional signals, pg. 2
- The Fourier transform is thus a scalar function
of D variables. - The Fourier transform is (in general) complex!
- The Inverse Fourier transform of Xa(W) is defined
by - Define the column vector of frequencies
- We get these relationships
Note the difference that D-dimensions introduces
compared to 1-d Fourier Transform!
13Example 2D Fourier Transform
Note Ringing artifacts, just like 1-D case when
we Fourier Transform a square wave
Image example from Gonzalez-Woods 2/e online
slides.
14Bandlimited Signals
- The notion of a bandlimited multidimensional
signal is a straight-forward extension of the
one-dimensional case - xa(t) is bandlimited if Xa(W) is zero everywhere
except over a region with finite area.
Bandlimited
Not Bandlimited
15Multidimensional Sampled Signals
- We will use nn0,n1,,nD-1T to denote an
arbitrary D-dimensional vector of integer values - A signal x(n) is just a function of D integer
values - The Fourier transform of x(n) and the inverse
transform are given by - Key point X(w) is periodic in each variable wi
with period 2p
16Multidimensional Z transform
- The Z transform of x(n) is
- Plugging in gives X(w).
- We will often use the notation
- This notation will be useful later as it allows
us to represent things in a way similar to the
1-dimensional Z-transform
17Properties of Fourier and Z transforms
- Linearity
- Shift
- Hence, the multidimensional Z-transform is
analogous to the one-dimensional delay operator - Convolution
18Multidimensional Filters
- The basic scenario for multidimensional digital
filters is - Convolution
- Here, the transfer function is
- If x(n) has finite support, then y(n) will
generally have larger support than x(n)
y(n)
x(n)
H(z)
19Multidimensional Filter Response
- Just as in 1-D, the filter H can be characterized
in terms of its frequency response. - In this case, the frequency response is
Rectangular Lowpass
Diamond Lowpass
Circular Lowpass
20Multidimensional Filters
- Multidimensional filters can be built by applying
1-D filters to each dimension separately - These types of filters are separable.
- A separable filter is one for which the frequency
response can be represented as
Rectangular Lowpass
Not Separable
212-D Convolution, by hand
- Rotate the impulse response array h( ? , ? )
around the original by 180 degree - Shift by (m, n) and overlay on the input array
x(m,n) - Sum up the element-wise product of the above two
arrays - The result is the output value at location (m, n)
From Jains book Example 2.1
22For Next Time
- Next time we will focus on multidimensional
sampling. - This lecture will be a blackboard/whiteboard
style lecture. - To prepare, read paper provided on website, and
the discussion on lattices in the textbook