Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1 Two-dimensional
PSfrag replacements
discrete signals
A 2-D discrete signal (also called a sequence or array) is a function defined over the set of
ordered pairs of integers:
N1
x = {x(n1 , n2 ), −∞ < n1 , n2 < ∞}.
N2
Thus x(n1 , n2 ) represents
x(nthe
1, n 2)
sample of the signal x at the point (n1 , n2 ). x(n1 , n2 ) for noninteger
n1 or n2 is undefined. y(n1 , n2 )
An example of a 2-D sequence T [·]
is shown below:
y(n1 , n2 ) = x(n1 − 1, n2 − 2)
k1 n2
k2
(n1 , n2 )
h(k1 , k2 ) 3
2
h(n1 − k1 , n2 − k2 ) 1 n1
ω1
ω2
−π
PSfrag replacementsπ
ω2
−π
π
The sequence values are assumed to be zero at the values not marked with circles. A circle with
no amplitude indicated represents a unit sample.
Certain sequences and classes of sequences play an important role in 2-D signal processing. The
impulse or unit sample sequence, denoted by δ(n1 , n2 ), is defined as
(
1, n1 = n2 = 0
δ(n1 , n2 ) =
0, otherwise,
and is depicted as
PSfrag replacements
N1
N2
x(n1 , n2 )
y(n1 , n2 )
T [·]
y(n1 , n2 ) = x(n1 − 1, n2 − 2) n2
k1
k2
(n1 , n2 )
h(k1 , k2 )
h(n1 − k1 , n2 − k2 ) n1
ω1
ω2
−π
π
Any sequence x(n1 , n2 ) can be represented as a linear combination of shifted impulses as follows:
Therefore
∞
X ∞
X
x(n1 , n2 ) = x(k1 , k2 )δ(n1 − k1 , n2 − k2 ).
k1 =−∞ k2 =−∞
This is a convolution product, and is useful in system analysis due to the sifting property of the
PSfrag replacements
impulse function.
Line impulses have no counterpart in 1-D. An example of a line impulse is
N1 (
1, n1 = 0
x(n1 ,Nn22 ) = δ(n1 ) =
x(n1 , n2 ) 0, otherwise.
y(n1 , n2 )
This is demonstrated below: T [·]
y(n1 , n2 ) = x(n1 − 1, n2 − 2) n2
k1
k2
(n1 , n2 )
h(k1 , k2 )
h(n1 − k1 , n2 − k2 ) n1
ω1
ω2
−π
π
2
PSfrag replacements
N1
is related to δ(n1 , n2 ) as follows: N2
x(n1 , n2 )
n1 n2
y(n1 , n2 ) X X
u(n1T, n
[·]2 ) = δ(k1 , k2 ).
k1 =−∞ k2 =−∞
y(n1 , n2 ) = x(n1 − 1, n2 − 2)
This sequence is shown below: k1
k2
n2
(n1 , n2 )
h(k1 , k2 )
h(n1 − k1 , n2 − k2 )
ω1 n1
ω2
−π
π
Other examples of step sequences are u(n1 ), u(n2 ), and u(n1 − n2 ), which have no counterpart in
1-D.
Exponential sequences are defined by
3
is nonzero only within the rectangle
0 ≤ n 1 ≤ N1 , 0 ≤ n 2 ≤ N2 .
PSfrag in
A periodic sequence replacements
2-D can be thought of as a sequence that repeats at regularly-spaced
intervals. However, 2-D signals must repeat in two dimensions at once, so the definition is more
complex than for 1-D.
A doubly periodic sequence x̃(n1 , n2 ) satisfies the conditions
) 1 , n2 + N2 ) = x̃(n1 , n2 )
x(n1 , n2x̃(n
)
y(n1 , nx̃(n
2
1 + N1 , n2 ) = x̃(n1 , n2 ).
T [·]
y(n1 , n2 )for
Such a sequence = x(n 1−
N1 = N1, n23−is2)
2 =
k1
n
k2 2
(n1 , n2 )
h(k1 , k2 )
h(n1 − k1 , n2 − k2 )
ω1
ω2N1
−π
n1
π N2
More generally,
PSfragthough, a periodic sequence in 2-D satisfies the conditions
replacements
x̃(n1 + N11 , n2 + N21 ) = x̃(n1 , n2 )
x̃(n1 + N12 , n2 + N22 ) = x̃(n1 , n2 ),
N1
where N2
x(n1 , n2 ) N11 N22 − N12 N21 = 0.
y(n1 , n2 )
An example of a sequence with N11 = 7, N21 = 3, N12 = −2, N22 = 4 is
T [·]
y(n1 , n2 ) = x(n1 − 1, n2 − 2) n2
PSfrag replacements 1 k
k2
(n1 ,nn1 2 )
n
h(k1 , k22 )
N
h(n1 − k1 , n2 − k12 )
N2
ω1
ω2 n1
−π
y(n , n ) = x(n − 1, n − 2) π
1 2 1 2
k1
k2
2 Multidimensional (n1 , n2 ) systems
h(k1 , k2 )
A system h(n
is an
1−operator
k1 , n2 −that
k2 ) maps one signal (the input) to another (the output):
ω1
ω2x(n1 , n2 ) y(n1 , n2 )
−π T [·]
π
4
2.1 Fundamental operations on multidimensional sequences
Addition of two sequences x(n1 , n2 ) and w(n1 , n2 ) is defined sample-by-sample as
y(n1 , n2 ) = cx(n1 , n2 ).
PSfrag replacements
A 2-D sequence x can be linearly shifted to form a new sequence y according to the relation
N1
N2 y(n1 , n2 ) = x(n1 − m1 , n2 − m2 ),
The collection of numbers c(n1 , n2 ) may also be regarded as a sequence, in which case the equation
above can be interpreted as the sample-by-sample multiplication of two sequences.
Two-dimensional sequences may also be subjected to nonlinear operators. A Memoryless non-
linearity operator acts on each sample value of the sequence independently. For example,
y(n1 , n2 ) = [x(n1 , n2 )]2 squares each value in the sequence x.
• If the input signal is the sum of two sequences, then the output signal is the sum of the two
corresponding output sequences
• Scaling the input signal produces a scaled output signal.
5
it follows that the response of a linear system to this signal is
" ∞ ∞
#
X X
y(n1 , n2 ) = T x(k1 , k2 )δ(n1 − k1 , n2 − k2 )
k1 =−∞ k2 =−∞
∞
X X∞
= x(k1 , k2 )T [δ(n1 − k1 , n2 − k2 )]
k1 =−∞ k2 =−∞
X∞ X∞
= x(k1 , k2 )hk1 k2 (n1 − k1 , n2 − k2 ),
k1 =−∞ k2 =−∞
where hk1 k2 (n1 − k1 , n2 − k2 ) is the response of the system to a unit impulse at (k1 , k2 ).
(n1 , n2 )
ω1
k1 k1
ω2
−π
π h(k1 , k2 ) h(n1 − k1 , n2 − k2 )
6
The product sequence x(k1 , k2 )h(n1 − k1 , n2 − k2 ) can then be formed, and the output sample
value y(n1 , n2 ) is computed by summing the nonzero sample values in the product sequence.
The properties of LSI 2-D systems are analogous to those for 1-D LTI systems. For example, when
2-D LSI systems are connected in parallel or cascade, then their overall response is the sum and
the convolution of the system impulse responses respectively. Also, a 2-D LSI system is stable in
the BIBO sense if and only if its impulse response is absolutely summable:
∞
X ∞
X
|h(n1 , n2 )| = S1 < ∞.
n1 =−∞ n2 =−∞
However, one must be careful not to take the analogy too far — 2-D LSI systems are considerably
more complex than 1-D LTI systems.
One property of 2-D systems that has no counterpart in 1-D is separability. A separable system
is an LSI system whose impulse response is a separable sequence, so h(n1 , n2 ) = h1 (n1 )h2 (n2 ).
The input signals processed by a separable system and the signals produced by it need not be
separable. For separable systems the convolution sum decomposes as
∞
X ∞
X
y(n1 , n2 ) = x(n1 − k1 , n2 − k2 )h1 (k1 )h2 (k2 )
k1 =−∞ k2 =−∞
X∞ ∞
X
= h1 (k1 ) x(n1 − k1 , n2 − k2 )h2 (k2 ).
k1 =−∞ k2 =−∞
Defining
∞
X
g(n1 , n2 ) = x(n1 , n2 − k2 )h2 (k2 ),
k2 =−∞
this becomes
∞
X
y(n1 , n2 ) = h1 (k1 )g(n1 − k1 , n2 ).
k1 =−∞
The array g(n1 , n2 ) can be computed by performing 1-D convolution between each column of x
(n1 constant) and the 1-D sequence h2 . The output array y can then be computed by convolving
each row of g (n2 constant) with the 1-D sequence h1 . Thus the output can be obtained as a series
of 1-D convolutions. Note that the row convolutions can also be performed before the column
convolutions.
PSfrag replacements
Another difference between 1-D and 2-D systems involves regions of support of signals. In 1-D
it was useful to characterise a system as causal if the outputs did not preceed the inputs. For
most 2-D applications the Nindependent
1 variables do not correspond to time, and causality is not
a natural constraint. N2
The impulse response x(n 2 ) a 1-D causal LTI system is zero for n < 0. One generalisation of the
1 , nof
h[n]
concept of causality for 12-D2 )systems can be made by requiring that the impulse response be zero
y(n , n
[·]
outside of some region of Tsupport.
y(n1 , n2 ) = x(n1 − 1, n2 − 2)
Two common regions of support k1 are:
k 2 n2 n2
(n1 , n2 )
h(k1 , k2 )
h(n1 − k1 , n2 − k2 )
ω1
ω2
−π n1 n1
π Quadrant support Wedge support
7
• Quadrant support, where sequences are nonzero only in one quadrant of the (n 1 , n2 )-plane
• Wedge support, which is a generalisation of quadrant support, and implies that the se-
quence is only nonzero inside a sector defined by two rays emanating from the origin.
This function is periodic in both the horizontal and vertical frequency variables:
H(ω1 + 2π, ω2 ) = H(ω1 , ω2 ),
H(ω1 , ω2 + 2π) = H(ω1 , ω2 ).
8
N1
N2
x(n1 , n2 )
y(n1 , n2 )
T [·]
y(n1 , n2 ) = x(n1 − 1, n2 − 2)
k1
k2 n2
(n1 , n2 )
h(k1 , k2 )
h(n1 − k1 , n2 − k2 )
ω1 n1
ω2
−π
π
is given by
∞
X ∞
X
H(ω1 , ω2 ) = [δ(n1 + 1, n2 ) + δ(n1 − 1, n2 )+
n1 =−∞ n2 =−∞
PSfrag replacements
This evaluates to n1
n 2 jω1
+ e−jω1 + ejω2 + e−jω2 = 2(cos ω1 + cos ω2 ).
H(ω 1 , ω2 ) = e
N1
and is shown below: N2
x(n1 , n2 )
y(n1 , n2 )
T [·]
4
y(n1 , n2 ) = x(n1 − 1, n2 − 2)
k1 2
H(ω1,ω2)
k2 0
(n1 , n2 )
h(k1 , k2 ) −2
h(n1 − k1 , n2 − k2 ) −4
ω1 π
ω2 0
π
0
ω2 −π −π
ω1
−b
−π
9
Since this system is separable the inverse Fourier transform is quite simple:
Z aZ b
1
h(n1 , n2 ) = ejω1 n1 +jω2 n2 dω2 dω1
4π 2 −a −b
Z a Z b !
1 −jω1 n1 1 −jω2 n2
= e dω1 e dω2
2π −a 2π −b
sin(an1 ) sin(bn2 )
= .
πn1 πn2
This function is depicted in the surface plot and image below, for the case of a = 0.4π and b = 0.6π.
The gray level at any point in the image is proportional to the function value:
0.2
h(n1,n2)
0.1 n2
10
10
0
n2 0
−10 −10 n1 n1
−π
10
the impulse response becomes
1
Z R Z 2π √ 2 2
h(n1 , n2 ) = 2
ωejω n1 +n2 cos(θ−φ) dφdω
4π 0 0
Z R q
1 2 2
= ωJ0 ω n1 + n2 dω
2π 0
p
J R n 2 + n2
R 1 1 2
= p
2π 2
n1 + n22
where J0 and J1 are Bessel functions of the first kind of orders 0 and 1 respectively.
This function is shown below for R = 0.5π:
0.2
0.1
h(n ,n )
1 2
2
0 n
−0.1
10
10
0
n2 0
−10 −10 n1 n
1
4 Sampling
PSfrag replacements
The most common way of representing a continuous signal is in terms of a discrete signal obtained
by periodic sampling. The simplest way of generalising 1-D periodic sampling to the 2-D case is
by using rectangular sampling, N where
1 periodic sampling is done in rectangular coordinates. If
xa (t1 , t2 ) is a continuous-time waveform, N2 then the discrete signal obtained by rectangular sampling
is x(n1 , n2 )
2 ) 1 , n2 ) = xa (n1 T1 , n2 T2 ),
y(n1 , nx(n
T [·]
where T1y(n and T are the horizontal and vertical sampling intervals. This corresponds to samples
1 , n22) = x(n1 − 1, n2 − 2)
in the plane: k1
k2 n
2
(n1 , n2 )
h(k1 , k2 )
h(n1 − k1 , n2 − k2 )
ω1
ω2
−π n1
π
11
PSfrag replacements
The criterion for being able to reconstruct xa from the samples is that T1 and T2 be chosen small
enough that
π π
Xa (Ω1 , Ω2N )=0 for |Ω1 | ≥ , |Ω2 | ≥ .
1 T1 T2
N2
Thus the signal must be bandlimited x(n1 , n2 ) in the 2-D Fourier domain. If this condition is not met,
aliasing results in the same way y(nas1 , in
n2 )1-D.
Rectangular sampling is not the only T [·] option for periodic sampling. For circularly-symmetric
bandlimitedy(nsignals
1 , n 2 ) it
= can
x(n be
1 − shown
1, n 2 that
− 2) there is no more efficient sampling scheme than hexagonal
sampling. That is, such signals can kbe 1 represented by fewer sample points than with any other
sampling geometry. Hexagonal sampling k2 is performed on a grid such as
(n1 , n2 )
n
h(k1 , k2 ) 2
PSfrag replacementsh(n − k , n − k )
1 1 2 2
n1 ω1
n2 ω2
N1 −π n1
N2 π
x(n1 , n2 )
Sometimes y(n , n2 ) in which data are acquired determines the sampling pattern. For example,
the 1manner
in the preparation T [·]of seismic maps it is common for a boat to tow a uniform microphone array
y(n1 , n2 )while
= x(ncovering
1 − 1, n2 an− 2) area. The presence of a cross current can cause an offset in the angle of the
array, resulting inkunusual
1 sampling:
k2
(n1 , n2 )
h(k1 , k2 )
h(n1 − k1 , n2 − k2 )
ω1
ω2
−π
π current
If a signal is sampled in such a way that aliasing is avoided, it is in general possible to transform
the representation onto the sampling grid of choice. In principle one just needs to reconstruct the
signal, and resample it as required.
The first equation formally holds for 0 ≤ k1 ≤ N1 − 1, 0 ≤ k2 ≤ N2 − 1 and the second for
0 ≤ n1 ≤ N1 − 1, 0 ≤ n2 ≤ N2 − 1.
The real part of some of the basis functions for the 2-D DFT are
12
If the sequence x(n1 , n2 ) is only supported on 0 ≤ n1 ≤ N1 − 1, 0 ≤ n2 ≤ N2 − 1 (and is therefore
zero outside of this area), then the DFT consists of samples of the 2-D Fourier transform
The properties of the 2-D DFT are similar to those in 1-D. In particular, the signals obtained from
both the DFT and the inverse DFT are implicitly doubly periodic with period N1 in the horizontal
direction and N2 in the vertical direction. Circular convolution according to the relation
NX
1 −1 N
X 2 −1
Thus the 2-D DFT can be calculated by performing 1-D DFTs on each column of x, followed
by 1-D DFTs on each row. Fast algorithms for 1-D DFTs can therefore be used to develop
multidimensional FFT methods.
13
However, although multidimensional difference equations represent a generalisation of 1-D differ-
ence equations, they are considerably more complex, and are in fact quite different. For example,
issues such as stability are far more difficult to understand for higher-dimensional systems.
A two-dimensional z-transform can be defined according to
∞
X ∞
X
H(z1 , z2 ) = h(k1 , k2 )z1−k1 z2−k2 .
k1 =−∞ k2 =−∞
This transform is very different in its 2-D form: poles and zeros form continuous surfaces in a
4-D space. Also, it is generally not possible to factorise a 2-D polynomial (there is no funda-
mental theorem of algebra for multidimensional polynomials). Nonetheless, the multidimensional
z-transform has been exhaustively analysed in the literature, and plays an important role in the
understanding of multidimensional systems.
Original image
There are multidimensional counterparts to the window method of filter design, as well as the
frequency-sampling method, the optimal method, and most others. Also, since FIR filters are
specified in terms of convolutions, the multidimensional FFT can be used in the implementation.
This becomes extremely important in high dimensions, due to the vast amount of data involved.
Shown below are examples of filter responses in 2-D:
14
Lowpass filter Bandpass filter
15