Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

акустика / gan_ws_acoustical_imaging_techniques_and_applications_for_en

.pdf
Скачиваний:
83
Добавлен:
04.05.2023
Размер:
5.27 Mб
Скачать

Signal Processing

17

Rank [A]:

Number of linearly independent rows or columns.

Inverse A−1:

A−1A = AA−1 = I

For square matrices only.

Trace:

Tr [A] = a(n, n) is the sum of the diagonal elements.

n

Toeplitz and Circulant Matrices:

A Toeplitz matrix, T, is a matrix that has constant elements along the main diagonal and the subdiagonals. This means that the elements t(m, n) depend only on the difference m n, that is t (m, n) = tmn. A matrix is called circulant if each of its rows (or columns) is a circular shift of the previous row (or column).

Orthogonal and Unitary Matrices:

An orthogonal matrix is such that its inverse is equal to its transpose, that is A is orthogonal to

A−1

= AT

or

AT A = AAT = I

(3.3)

A−1

= A T

or

AA T = A T A = I

(3.4)

So a real orthogonal matrix is also unitary, but a unitary matrix need not be orthogonal.

3.1.3Fourier Transformation

The purpose of image transformation is to transform the images to digital form in pixels to enable image processing procedures, such as noise filtering, edge enhancement, feature extraction, and so on. We will start with the one-dimensional signal. A one-dimensional signal can be represented by an orthogonal series of basis functions. For continuous functions, an orthogonal series expansion provides series coefficients that can be used for any further processing or analysis of the function. For a signal that is a one-dimension sequence, it is usually represented as a vector u of size N, {u (n) , 0 ≤ n N − 1}.

A unitary transformation can be written as

 

 

 

 

 

N−1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0 ≤ k N − 1

(3.5)

v = Au v(k) =

a (k, n) u (n) ,

 

 

 

 

 

n=0

 

 

 

 

 

 

 

 

 

 

where A−1 = A T (unitary). This gives

 

 

 

 

 

 

 

 

 

 

 

 

A T v

 

 

N−1

 

 

 

 

 

 

 

 

 

 

u

 

 

u(n)

 

v(k)a

(k,n),

0

 

n

 

N

 

1

(3.6)

 

=

 

 

 

=

 

 

 

 

 

 

 

k=0

Equation (3.6) is a series representation of the sequence u(n). The columns of A T , that is,

 

n N − 1}T are called the basis of A. The series coefficients

the vectors ak = {a (k, n) , 0

18

Acoustical Imaging: Techniques and Applications for Engineers

v(k) give a representation of the original sequence u(n) and are useful in filtering, the feature extraction of images, and so on.

A Fourier series is a special case of an orthogonal series. Fourier transformation is the transformation from the spatial domain to the frequency domain.

3.1.3.1 One-Dimensional Discrete Fourier Transform

The discrete Fourier transform (DFT) of a sequence {u (n) , n = 0, . . . . . . . . . . , N − 1} is defined as

 

 

 

N−1

u(n)WNkn,

 

 

 

 

 

 

 

 

v(k) =

 

k = 0, 1, . . . , N − 1

 

(3.7)

 

 

 

n=0

 

 

 

 

 

 

 

 

 

where

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

j2π

 

 

 

 

 

 

 

 

WN = exp

 

 

 

 

 

 

 

(3.8)

 

 

 

 

N

 

 

 

 

The inverse transform is given by

 

 

 

 

 

 

 

 

 

 

1

N−1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

u(n)

 

 

 

v (k) W kn

,

n

 

 

0, 1, . . . ,N

 

1

(3.9)

 

= N k=0

N

 

 

=

 

 

 

Equations (3.5) and (3.7) are not scaled properly to be unitary transformations. In image processing, it is more convenient to consider the unitary DFT, which is defined as

 

1

N−1

u(n)WNkn,

 

 

 

 

 

 

v(k) =

 

 

k = 0, . . . ,N − 1

 

(3.10)

 

 

 

N

n=0

 

 

 

 

 

 

 

 

 

 

 

 

 

1

N−1

v (k) W kn,

 

 

 

 

 

 

u(n)

 

 

 

 

n

 

0, . . . , N

 

1

(3.11)

= √

 

 

=

 

N

k=0

N

 

 

 

 

×

The N N unitary DFT matrix N is given by

 

1

 

 

N =

N WNkn , 0

k, n N − 1

(3.12)

The DFT is one of the most important transforms in digital signal and image processing.

3.1.3.2Properties of DFT and Unitary DFT

Let u(n) be an arbitrary sequence defined for n = 0,1, . . . , N – 1. A circular shift of u(n) by l, denoted by u(n – l) is defined as u(n – l) modulo N.

The DFT and unitary DFT matrices are symmetric. By definition the matrix F is symmetric. Therefore

F−1 = F

Signal Processing

19

The extensions are periodic. The extension of the DFT and unitary DFT of a sequence and their inverse transforms are periodic with period N. That is, in (3.10), v(k) = v(k + N) for every k.

The DFT is the sampled spectrum of the finite sequence u(n) extended by zeros outside the interval [0, N − 1]. If we define a zero-extended sequence

 

 

 

u

(n) , 0 ≤ n N − 1

 

 

 

 

 

u˜(n) =

 

 

0,

 

otherwise

 

 

(3.13)

then its Fourier transform is

 

 

 

 

 

 

 

 

 

 

 

 

U˜

 

 

 

 

 

 

 

N−1

 

 

 

=

 

 

 

 

 

 

 

 

˜

 

jωn)

=

 

u (n) exp(

jωn)

(3.14)

 

u(n)exp(

 

 

 

 

 

 

 

n=−∞

 

 

 

 

 

 

n=0

 

 

 

Comparing (3.14) with (3.5), we find that

 

 

 

2N

 

 

 

 

 

 

 

v(k) = u˜

 

 

(3.15)

 

 

 

 

 

 

 

 

π k

 

 

 

 

Also, the unitary DFT of (3.8) would be u˜(

2π k

 

 

 

 

 

 

 

)/

N.

 

 

 

 

N

 

 

 

 

 

 

3.1.3.3The Fast Fourier Transform

The fast Fourier transform (FFT) was invented by Cooley and Tukey in 1965 [1]. Its purpose was to reduce the computation time of the DFT and the unitary DFT. It is a class of algorithms that requires O(N log2 N) operations, where one operation is a real multiplication and a real addition. The exact operation count depends on N as well as the particular choice of the algorithm in that class. Most common FFT algorithms require N = 2P, where P is a positive integer.

The DFT or unitary DFT of a real sequence {x(n), n = 0, . . . , N − 1} is conjugate symmetric about N/2.

From (3.10), we have

v (N

 

k)

N−1

 

(n) W (Nk)n

 

 

N−1

 

 

 

 

 

v(k)

(3.16)

 

 

u

 

 

u(n)W kn

 

 

 

 

 

 

 

 

 

 

=

 

 

 

 

 

=

 

 

 

 

=

 

 

 

 

 

N

 

n=0

 

 

N

 

 

 

 

 

 

 

n=0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

and

 

 

 

k

= v

 

 

+ k ,

 

k = 0, . . . ,

 

 

− 1

 

v

2

 

2

 

2

 

(3.17)

 

 

N

 

 

 

 

 

 

 

N

 

 

 

 

 

 

 

N

 

 

 

 

and

 

 

 

 

v

 

 

 

k

= v

 

+ k

 

 

 

 

 

 

 

 

 

 

 

 

2

 

2

 

 

 

 

 

 

(3.18)

 

 

 

 

 

 

 

N

 

 

 

 

 

 

N

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

=

v(N k).

 

By considering the periodic

 

extension of v(k), we have V(–k)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The DFT or unitary DFT of an N × 1 real sequence has N degrees of freedom and requires the same storage capacity as the sequence itself.

20

Acoustical Imaging: Techniques and Applications for Engineers

3.1.3.4 Circular Convolution Theorem

The DFT of the circular convolution of two sequences is equal to the product of their DFTs, that is, if

N−1

 

 

 

x2 (n) = h (n k)c x1 (k) , 0 ≤ n N − 1

(3.19)

k=0

 

then

 

DFT {x2 (n)}N = DFT {h(n)}N DFT {x1 (n)}N

(3.20)

where

 

DFT {x2 (n)}N = DFT {h(n)}N DFT {x1}N

(3.21)

in which DFT{x(n)}N denotes the DFT of the sequence x(n) of size N. Hence one can calculate the circular convolution by first calculating the DFT of x2(n) using (3.21) and then taking its inverse DFT. Using FFT this will take O(N log2 N) operations compared to the N2 operations required for the direct computation of (3.19).

3.1.3.5Extension from One-Dimensional Signal Processing to Two-Dimensional Image Processing

Just as a one-dimensional signal can be represented by an orthogonal set of basis functions, an image can also be expanded in terms of a discrete set of basic arrays called basis images. These basis images can be generated by unitary matrices. An image transform provides a set of coordinates or basis vectors for the vector space.

3.1.3.6 Two-Dimensional Orthogonal and Unitary Transforms

By extending the one-dimensional orthogonal series expansion to a two-dimensional expansion, one has

 

N−1

 

 

 

 

 

 

 

 

 

 

 

 

 

0 ≤ k, l N − 1,

(3.22)

v(k,l) =

u (m, n) ak,l (m, n) ,

and

m,n=0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

N−1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

u(m,n)

=

v(k, l)a

(m,n), 0

m, n

N

1,

(3.23)

 

k,l

 

 

 

 

 

k,l=0

where ak,l (m, n) denotes the image transform. Equations (3.22) and (3.23) form a set of complete orthogonal discrete basis functions satisfying the following properties:

 

N−1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

a

 

(m, n)a

 

 

k , l

 

 

l

 

(3.24)

Orthogonality:

 

k,l

δ k

 

 

 

m,n=0

 

k ,l =

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

N−1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Completeness:

 

k,l

 

 

k,l

(m ,n )

=

δ(m

m

, n

n )

(3.25)

a

 

(m, n)a

 

 

 

 

k,l=0

Signal Processing

21

The elements v(k, l) are called the transform coefficients and V = {v(k.l))}is called the transformed image. The orthonormality property assures that any truncated series expansion of the form

u

(m, n)

P−1 Q−1

 

P

 

N, Q N

(3.26)

v(k, l)a (m,n),

 

P,Q

=

 

k,l

 

 

 

 

 

 

k=0 l=0

 

 

 

 

 

 

 

will minimize the sum of squares error

 

 

 

 

 

 

 

 

σe2 =

N−1

u (m, n) uP,Q (m, n)

 

2

 

(3.27)

 

 

 

 

 

 

 

 

 

 

m,n=0

when the coefficients v(k, l) are given by (3.22).

3.1.3.7 Basis Images

Let ak denote the kth column of A T , the complex conjugate of the unitary matrix AT .Define the matrices

 

A

=

a a T

 

(3.28)

 

k,l

k l

 

 

and the matrix inner product of two N × N matrices F and G as

 

 

N−1 N−1

 

 

 

 

 

(3.29)

< F, G ≥=

 

f (m, n) g (m, n)

 

m=0 n=0

 

 

 

Then (3.23) and (3.22) give a series representation for the image as

 

 

N−1

 

 

 

 

 

 

 

 

U

=

 

v(k, l)A

(3.30)

 

 

 

k,l

 

 

k,l=0

 

 

 

 

where

 

 

 

 

 

V (k,l)

< U, A

>

(3.31)

 

=

k,l

 

 

Equation (3.30) expresses any image U as a linear combination of the N2 matrices Ak,l , k, l = 0, . . . , N – 1, which are called the basis images.

3.1.3.8The Two-Dimensional DFT

The two-dimensional DFT of an N × N image {u(m, n)} is a separable transform defined as

 

N−1 N−1

 

v (k, l ) =

 

 

u(m, n)WNkmWNln, 0 ≤ k, l N − 1

(3.32)

 

m=0 n=0

 

The transform is separable if

 

 

 

 

(3.33)

ak,l (m, n) = ak (m)bl (n) = a (k, m) b(l, n)

22 Acoustical Imaging: Techniques and Applications for Engineers

where {ak (m), k = 0, . . . . . . . , N − 1},{bl (n) , l = 0, . . . . . , N − 1}

are

one-dimensional

complete orthonormal sets of basis vectors.

 

 

 

 

 

 

 

 

 

 

The inverse transform is

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

N−1 N−1

v(k, l)W kmW ln,

 

 

 

 

 

 

 

 

u(m,n)

 

 

 

 

 

0

m, n

N

1

(3.34)

= N2

 

 

k=0 l=0

N

N

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The two-dimensional unitary DFT pair is defined as

 

 

 

 

 

 

 

 

 

 

 

1

 

N−1‘ N−1

u(m, n)WNkmWNln,

 

 

 

 

 

 

 

 

 

v(k,l) =

 

 

 

 

0 ≤ k, l N − 1

 

(3.35)

N

 

m=0 n=0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

N−1 N−1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

u(m, n)

 

 

 

 

v(k, l)W kmW

ln

,

0

m, n

N

1

(3.36)

 

= N k=0 l=0

N N

 

 

 

 

 

 

In matrix notation this becomes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

V = F F

 

 

 

 

 

 

 

 

 

(3.37)

3.1.4The Z-Transform

The Z-transform is a generalization of the Fourier transform to the two-dimensional complex regime. The Z-transform of the complex sequence x(m, n) is defined as

 

 

 

 

 

 

 

 

 

 

 

X(z

, z

)

=

x(m, n)zmzn

(3.38)

1

2

 

1 2

 

m,n=∞

where z1 and z2 are complex variables.

The Z-transform of the impulse response of a linear shift invariant discrete system is called its transfer function.

Applying the Z-transform to the convolution theorem and to (3.38), we have

Y (z1, z2 ) = H (z1, z2 ) X (z1, z2 )

or

H (z1, z2 ) =

Y (z1, z2 )

(3.39)

X (z1, z2 )

This shows the transfer function of the systems, the ratio of the Z-transforms of the output, and the input sequences.

The inverse Z-transform is given by the double contour integral

X (m, n)

 

1

 

X (z

, z

)zm−1zn−1dz

dz

 

(3.40)

 

 

= ( j2π )2

 

 

 

1

2

1 2

1

 

2

 

where the contours of integration are counterclockwise and lie in the region of convergence. The region of convergence is defined as the set of values of z1, z2 for which the series converges uniformly.

Signal Processing

23

3.2Image Enhancement

Image enhancement is a very important topic and is useful in virtually all image processing applications. Image enhancement means the sharpening of image features such as edges, boundaries, or contrast to improve the resolution of the acoustical images. It is a form of digital image processing. From Rayleigh’s criterion, the resolution of the acoustical image is limited to λ/2, where λ is the sound wavelength. Hence, to increase the clarity of the images, we have to resort to digital image processing, an engineering method. The enhancement process does not increase the inherent information content in the data, but it does increase the dynamic range of the chosen features to enable them to be easily detected. Image enhancement techniques include grey level and contrast manipulation, noise reduction, edge sharpening, filtering, interpolation and magnification, pseudo-colouring, and so on. The greatest difficulty in image enhancement is quantifying the criterion for enhancement. Therefore, a large number of image enhancement techniques are empirical and require interaction procedures to obtain satisfactory results.

3.2.1Spatial Low-Pass, High-Pass and Band-Pass Filtering

Low-pass filters are useful for noise smoothing and interpolation. High-pass filters are useful for extracting edges and sharpening images. Band-pass filters are useful in the enhancement of edges and other high-pass image characterizations in the presence of noise.

A spatial averaging operation is a low-pass filter (Figure 3.1(a)). If hLP (m, n) represents a FIR low-pass filter, then a FIR high-pass filter, hHP (m, n), can be given as

hHP (m, n) = δ (m, n) hLP (m, n)

(3.41)

Such a filter can be implemented by simply subtracting the low-pass filter output from its input (Figure 3.1(b)). Typically the low-pass filter would perform a relatively long-term spatial average.

u(m, n)

Spatial

vLP (m, n)

 

averaging

 

 

 

 

 

 

u(m, n)

+

vHP (m, n)

LPF

 

+

 

 

(a) Spatial low-pass filter

 

(b) Spatial high-pass filter

u(m, n)

LPF

+

+

vBP (m, n)

 

hL (m, n)

 

 

 

 

 

 

 

 

 

1

 

 

 

 

LPF hL2(m, n)

(c) Spatial band-pass filter

Figure 3.1 Spatial filters (Jain [2])

24

Acoustical Imaging: Techniques and Applications for Engineers

A spatial band-pass filter can be characterized as (see Figure 3.1(c)):

hBP (m, n) = hL1 (m, n) hL2 (m, n)

(3.42)

where hL1 (m, n) and hL2 (m, n) denote the FIRs of low-pass filters. Typically hL1 and hL2 would represent short-term and long-term averages, respectively.

3.2.2Magnification and Interpolation (Zooming)

It is often necessary to zoom into a certain region of an image when one needs to view that region in more detail.

3.2.3Replication

Replication is a zero-order hold where each pixel along a scan line is repeated once and each scan line is then repeated. This is equivalent to taking an M × N image and interlacing it by rows and columns of zeros to obtain a 2M × 2N matrix and convolving the result with an array H, defined as

 

 

 

 

1

 

 

 

 

H =

 

1

1

 

 

(3.43)

This gives

 

 

 

 

 

 

 

 

 

 

m

 

, l = Int

n

, m,n = 0, 1, 2 . . .

(3.44)

v(m,n) = u(k, l),k = Int

 

 

2

2

 

 

 

 

 

 

 

Figure 3.2 shows some examples of interpolation by replication.

3.2.4Linear Interpolation

Linear interpolation is a first-order hold where a straight line is first fitted between pixels along a row. The pixels along each column are then interpolated along a straight line.

Figure 3.2 shows some examples of linear interpolation.

3.2.5Transform Operation

Transform operation is another image enhancement technique. Here zero-memory operations are performed on a transformed image, followed by the inverse transformation as shown in Figure 3.3.

3.3Image Sampling and Quantization

The most basic requirement for digital image processing is to convert the images into digital form – that is, as arrays of finite-length binary words. For digitization, the given image is sampled on a discrete grid and each sample or pixel is quantized using a finite number of

Signal Processing

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

25

 

 

 

 

 

 

 

 

 

 

 

0

7

0

 

 

 

 

 

 

 

4

7

3.5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

1

 

 

 

 

 

1

4

7

3.5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

7

 

 

Zero

 

0

0

0

0

 

 

Interpolate

 

0

0

0

0

 

 

 

Interpolate

 

2

3

4

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

1

 

 

interlace

 

3

0

1

 

0

 

 

rows

 

3

2

1

0.5

 

 

columns

 

3

2

1

0.5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

0

 

 

 

 

 

0

0

0

0

 

 

 

 

 

 

1.5

1

0.5

0.25

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(a)

(b)

Figure 3.2 Zooming by linear interpolation from 128 × 128 to 256 × 256 and 512 × 512 images (Jain [2])

u(m, n)

Unitary

v(k, l )

Point

v (k, l )

Inverse

u(m, n)

 

 

transform

 

 

operations

 

 

transform

 

 

 

 

 

 

 

 

 

 

AUAT

 

 

/[ – ]

 

 

A–1V [AT] –1

 

Figure 3.3 Image enhancement by transform filtering (Jain [2])

26

 

 

Acoustical Imaging: Techniques and Applications for Engineers

 

F 1, ξ2)

 

 

 

 

 

 

 

 

(a)

 

 

(b)

 

 

 

 

 

 

 

 

 

 

 

ξ2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ξr 0

 

 

 

ξx 0

ξ

1

–ξx 0

 

ξx 0

 

ξ1

 

 

 

 

 

 

 

 

 

 

–ξr 0

–ξr 0

 

ξ2

 

Figure 3.4 (a) Fourier transform of a band-limited function. (b) Its region of support (Jain [2])

bits. The digitized image can then be processed by the computer. After digital processing, the image has to be converted to an analogue signal.

A common method of image sampling is to scan the image row by row and sample each row. The digitization process for images can be understood by modelling the images as bandlimited signals. Although real-world images are rarely band-limited, they can be approximated by band-limited functions. A function f(x, y) is band-limited if its Fourier transform F (ξ1, ξ2 ) is zero outside a bounded region in the frequency plane, that is

F (ξ1, ξ2 ) = 0, if |ξ1 | > ξx0, |ξ2| > ξy0

(3.45)

Here, ξx0 and ξy0 are known as the x and y bandwidths of the image. This can be illustrated in Figure 3.4.

3.3.1Sampling versus Replication

The sampling theory can be easily understood by remembering that the Fourier transform of an arbitrarily sampled function is a scaled, periodic replication of the Fourier transform of the original function.

3.3.2Reconstruction of the Image from its Samples

From the uniqueness of the Fourier transform, if the spectrum of the original image could be recovered somehow from the spectrum of the sampled image, then we would have an