Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.

Similar presentations


Presentation on theme: "1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng."— Presentation transcript:

1 1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng Chapter 15: Wavelets

2 2 © 2010 Cengage Learning Engineering. All Rights Reserved. 15.1 Waves and Wavelets The idea of wavelets is to keep the wave concept, but drop the periodicity We may consider a wavelet to be a little part of a wave, a wave that is only nonzero in small region Ch15-p.429

3 3 © 2010 Cengage Learning Engineering. All Rights Reserved. 15.1 Waves and Wavelets Suppose we are given a wavelet Dilate it by applying a scaling factor to x: f (2x) would “squash” the wavelet, and f (x/2) would expand it Translate it by adding or subtracting an appropriate value from x: f (x − 2) would shift the wavelet 2 to the right; f (x + 3) would shift the wavelet 3 to the left Change its height by simply multiplying the function by a constant Ch15-p.429

4 4 FIGURE 15.2 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.431

5 5 FIGURE 15.2 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.431

6 6 15.1 Waves and Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. 15.1.1 A simple Wavelet Transform Wavelet transforms work by taking weighted averages of input values and providing any other necessary information to be able to recover the original input Averaging of two values and differencing Ch15-p.432

7 7 15.1 Waves and Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. suppose we are given two numbers, 14 and 22. We can easily create their average To recover the original two values from their average, we need a second value, the difference, obtained by subtracting the average from the first value: Ch15-p.432

8 8 15.1 Waves and Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. e.g. The concatenation of v 1 and v 2 is the Discrete wavelet transform at 1 scale of the original vector Ch15-p.433

9 9 15.1 Waves and Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. Discrete wavelet transform at 2 scales Discrete wavelet transform at 3 scales Ch15-p.433

10 10 15.1 Waves and Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. To recover the original vector At each stage, the averaging vector produces a lower-resolution version of the original vector Ch15-p.434

11 11 15.1 Waves and Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. Wavelet transforms produce a mix of lower resolutions of the input and the extra information required for inversion We notice that the differences may be small if the input values are close together. This concept leads to an idea for compression We apply a threshold by setting to zero all values in the transform that are less than a predetermined value Ch15-p.434

12 12 Threshold d 3 with 0 Use d’ 3 to recover the original vector 15.1 Waves and Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.434

13 13 15.2 A simple Wavelet: The Haar Wavelet © 2010 Cengage Learning Engineering. All Rights Reserved. The Haar wavelet is defined by the function Ch15-p.434

14 14 15.2 A simple Wavelet: The Haar Wavelet © 2010 Cengage Learning Engineering. All Rights Reserved. 15.2.1 Applying the Haar Wavelet where the subscripts on φ(x) and ψ(x) represent different dilations and shifts of the basic functions. Then, we can recover f ( x ) with Ch15-p.435

15 15 15.2 A simple Wavelet: The Haar Wavelet © 2010 Cengage Learning Engineering. All Rights Reserved. The form of the equations above indicates that the discrete wavelet transform can be written as a matrix multiplication, as we saw for the DFT We will show below how this is done. Notice that the Haar wavelet can be written in terms of the simpler pulse function: Mother wavelet father wavelet Ch15-p.435

16 16 15.2 A simple Wavelet: The Haar Wavelet © 2010 Cengage Learning Engineering. All Rights Reserved. Dilation equation h i are called the filter coefficients (taps) Ch15-p.436

17 17 15.2 A simple Wavelet: The Haar Wavelet © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.437

18 18 15.2 A simple Wavelet: The Haar Wavelet © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.437

19 19 © 2010 Cengage Learning Engineering. All Rights Reserved. The averaging part of the wavelet corresponds to low-pass filtering, in that we are coarsening or blurring our input Similarly, the differencing part of the transform corresponds to a high-pass filter Thus, a wavelet transform contains within it both high- and low-pass filtering of our input, and we can consider a wavelet transform entirely in terms of filters Ch15-p.438 15.2 A simple Wavelet: The Haar Wavelet

20 20 © 2010 Cengage Learning Engineering. All Rights Reserved. 15.2.2 Two-Dimensional Wavelets standard decomposition Ch15-p.438

21 21 15.2 A simple Wavelet: The Haar Wavelet © 2010 Cengage Learning Engineering. All Rights Reserved. nonstandard decomposition Ch15-p.439

22 22 15.3 Wavelets in M ATLAB © 2010 Cengage Learning Engineering. All Rights Reserved. We will use the UviWave toolbox, developed at the University of Vigo in Spain. Its homepage is http://www.tsc.uvigo.es/ ∼ wavelets/uvi_wave.html It can also be found at other places on the Web Assuming that you have downloaded and installed the toolbox Ch15-p.439

23 23 15.3 Wavelets in M ATLAB © 2010 Cengage Learning Engineering. All Rights Reserved. Here h and g are the low-pass and high-pass filter coefficients for the forward transform rh and rg are the low-pass and high-pass filter coefficients for the inverse transform The daub function produces the filter coefficients for a class of wavelets called Daubechies wavelets, of which the Haar wavelet is the simplest Ch15-p.439

24 24 15.3 Wavelets in M ATLAB © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.440

25 25 15.3 Wavelets in M ATLAB © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.440

26 26 15.3 Wavelets in M ATLAB © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.441

27 27 FIGURE 15.6 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.441

28 28 FIGURE 15.7 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.442

29 29 15.4 The Daubechies Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.442

30 30 As for the Haar wavelet, we can apply the Daubechies 4 wavelet by a matrix multiplication; the matrix for a one-scale DWT on a vector of length 8 is 15.4 The Daubechies Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.443

31 31 15.4 The Daubechies Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. Notice that the filter coefficients overlap between rows, which is not the case for the Haar matrix This means that the use of the Daubechies 4 wavelet will have smoother results than using the Haar wavelet Ch15-p.443

32 32 15.4 The Daubechies Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. Steps for performing a one-scale wavelet transform are given by Umbaugh [37]: 1.Convolve the image rows with the low-pass filter 2.Convolve the columns of the result of Step 1 with the low- pass filter and rescale this to half its size by subsampling 3.Convolve the result of Step 1 with the high-pass filter and again subsample to obtain an image of half the size 4.Convolve the original image rows with the high-pass filter Ch15-p.444

33 33 15.4 The Daubechies Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. 5.Convolve the columns of the result of Step 4 with the low- pass filter and rescale this to half its size by subsampling 6.Convolve the result of Step 4 with the high-pass filter and again subsample to obtain an image of half the size At the end of these steps there are four images, each half the size of the original Ch15-p.444

34 34 FIGURE 15.8 © 2010 Cengage Learning Engineering. All Rights Reserved. 1.the low-pass/low-pass image (LL), the result of Step 2, 2.the low-pass/high-pass image (LH), the result of Step 3, 3.the high-pass/low-pass image (HL), the result of Step 5, and 4.the high-pass/high-pass image (HH), the result of Step 6 Ch15-p.444

35 35 15.4 The Daubechies Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. The filter coefficients of a wavelet are such that the transform may be inverted precisely to recover the original image Using filters, this is done by taking each subimage, zero interleaving to produce an image of double the size and convolving with the inverse low-pass and high-pass filters Finally, the results of all the filterings are added. For the Daubechies 4 wavelet, the inverse low-pass and high-pass filters are Ch15-p.444

36 36 15.4 The Daubechies Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. A generalization to filtering: lifting Ch15-p.445 (Haar wavelet)

37 37 15.4 The Daubechies Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. A lifting scheme for the Daubechies 4 wavelet is Ch15-p.445

38 38 FIGURE 15.9 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.446

39 39 FIGURE 15.10 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.446

40 40 15.5 Image Compression Using Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. 15.5.1 Thresholding and Quantization Ch15-p.447

41 41 FIGURE 15.11 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.448

42 42 FIGURE 15.12 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.448

43 43 15.5 Image Compression Using Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.449

44 44 FIGURE 15.13 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.449

45 45 FIGURE 15.14 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.450

46 46 FIGURE 15.15 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.450

47 47 15.5 Image Compression Using Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. 15.5.2 Extraction Ch15-p.451

48 48 FIGURE 15.17 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.452

49 49 15.6 High-Pass Filtering Using Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.452

50 50 FIGURE 15.18 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.453

51 51 15.7 Denising Using Wavelets © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.453

52 52 FIGURE 15.19 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.454

53 53 FIGURE 15.20 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch15-p.454


Download ppt "1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng."

Similar presentations


Ads by Google