The Structure of Digital Imaging: The Haar Wavelet Transformation - - PowerPoint PPT Presentation

the structure of digital imaging the haar wavelet
SMART_READER_LITE
LIVE PREVIEW

The Structure of Digital Imaging: The Haar Wavelet Transformation - - PowerPoint PPT Presentation

The Structure of Digital Imaging: The Haar Wavelet Transformation and Image Compression Adam L. Bruce and Alice R. Pitt December 7, 2009 Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation Adam L.


slide-1
SLIDE 1

The Structure of Digital Imaging: The Haar Wavelet Transformation and Image Compression

Adam L. Bruce and Alice R. Pitt December 7, 2009

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-2
SLIDE 2

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-3
SLIDE 3

Abstract

The Haar wavelet transform allows images to be compressed and sent over a network of computers so that it is visable to anyone on the network. The mathematical apparatus for the transform is that of linear algebra and other elements of matrix theory, the main part of this being manipulations applied to the initial matrix representing a certian resolution of an image. It shall be shown how these techniques are used in conjuction with each other to create a given digital image of a certain resolution. Prerequisites: A rudimentary knowledge of matrices and arithmetical operations. Also, an indtroductory course in linear algebra would be helpful for the third section.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-4
SLIDE 4

Overview

◮ How is an image sent over a computer network?

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-5
SLIDE 5

Overview

◮ How is an image sent over a computer network? ◮ It’s possible through a technique called the Haar wavelet

transformation.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-6
SLIDE 6

Overview

◮ How is an image sent over a computer network? ◮ It’s possible through a technique called the Haar wavelet

transformation.

◮ There are two main mathematical processes averaging and

differencing.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-7
SLIDE 7

Overview

◮ How is an image sent over a computer network? ◮ It’s possible through a technique called the Haar wavelet

transformation.

◮ There are two main mathematical processes averaging and

differencing.

◮ They are simple, but to use them in a large matrix requires

some linear algebra.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-8
SLIDE 8

Overview

◮ How is an image sent over a computer network? ◮ It’s possible through a technique called the Haar wavelet

transformation.

◮ There are two main mathematical processes averaging and

differencing.

◮ They are simple, but to use them in a large matrix requires

some linear algebra.

◮ Most of the operations can also be programmed into Matlab.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-9
SLIDE 9

An Image as a Matrix

◮ Every Image represents a matrix

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-10
SLIDE 10

An Image as a Matrix

◮ Every Image represents a matrix ◮ The numbers within the matrix represent different shades of

black and white or color.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-11
SLIDE 11

An Image as a Matrix

◮ Every Image represents a matrix ◮ The numbers within the matrix represent different shades of

black and white or color.

◮ The values of the numbers range from 0 to some positive

whole number.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-12
SLIDE 12

An Image as a Matrix

◮ Every Image represents a matrix ◮ The numbers within the matrix represent different shades of

black and white or color.

◮ The values of the numbers range from 0 to some positive

whole number.

◮ For this presentation we will only consider gray-scale images.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-13
SLIDE 13

An Image as a Matrix

◮ So consider the matrix:

A =             123 145 222 234 68 66 76 12 34 19 187 188 47 182 209 4 144 55 23 27 111 29 250 48 38 79 247 72 77 112 14 63 14 149 150 37 44 121 11 233 155 122 69 58 47 136 18 34 21 13 59 209 146 100 10 211 151 98 60 32 31 88 17            

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-14
SLIDE 14

An Image as a Matrix

◮ So consider the matrix:

A =             123 145 222 234 68 66 76 12 34 19 187 188 47 182 209 4 144 55 23 27 111 29 250 48 38 79 247 72 77 112 14 63 14 149 150 37 44 121 11 233 155 122 69 58 47 136 18 34 21 13 59 209 146 100 10 211 151 98 60 32 31 88 17            

◮ This could represent some portion of an image

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-15
SLIDE 15

An Image as a Matrix

◮ The image

Figure: Bird

is a 256 by 256 matrix.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-16
SLIDE 16

Averaging and Differencing

◮ So how do we transport the image?

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-17
SLIDE 17

Averaging and Differencing

◮ So how do we transport the image? ◮ Using averaging and differencing we can actually compress an

image, making it easier to transport.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-18
SLIDE 18

Averaging and Differencing

◮ So how do we transport the image? ◮ Using averaging and differencing we can actually compress an

image, making it easier to transport.

◮ How is this done?

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-19
SLIDE 19

Averaging and Differencing

◮ To average first we isolate a row, called a data string, such as

S1 =

  • 122

145 222 234 68 66 76 12

  • This is row one of Matrix A.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-20
SLIDE 20

Averaging and Differencing

◮ To average first we isolate a row, called a data string, such as

S1 =

  • 122

145 222 234 68 66 76 12

  • This is row one of Matrix A.

◮ We now can find the basic average of these terms, given by

y = x1 + x2 2 . where x1 and x2 are two elements in S1 which are next to each other.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-21
SLIDE 21

Averaging and Differencing

◮ The difference is found by taking the average and subtracting

them from x1 like d = x1 − y

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-22
SLIDE 22

Averaging and Differencing

◮ The difference is found by taking the average and subtracting

them from x1 like d = x1 − y

◮ These differenced numbers are the detail coefficients.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-23
SLIDE 23

Averaging and Differencing

◮ Both averaging and differencing must take place 3 times with

a string with length 8.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-24
SLIDE 24

Averaging and Differencing

◮ Both averaging and differencing must take place 3 times with

a string with length 8.

◮ This is because 23 = 8.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-25
SLIDE 25

Averaging and Differencing

◮ Both averaging and differencing must take place 3 times with

a string with length 8.

◮ This is because 23 = 8. ◮ Here is a table which summarizes the results on S1:

Table: Averaging and Differencing of S1

Compression No. average/detail coefficient 1 133.5 228 67 44

  • 11.5
  • 6

1 32 2 180.7 55.5

  • 47.2

12

  • 11.5
  • 6

1 32 3 118 67.7

  • 47.2

12

  • 11.5
  • 6

1 32

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-26
SLIDE 26

Basic Compression Matrices

◮ Consider images as matrices. There must be an efficient way

to apply the previous idea of averaging and differencing to a matrix the size of 256 by 256.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-27
SLIDE 27

Basic Compression Matrices

◮ Consider images as matrices. There must be an efficient way

to apply the previous idea of averaging and differencing to a matrix the size of 256 by 256.

◮ This would bring in a compression matrix:

            1/2 1/2 1/2 −1/2 1/2 1/2 1/2 −1/2 1/2 1/2 1/2 −1/2 1/2 1/2 1/2 −1/2            

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-28
SLIDE 28

◮ This simplifies what could be a rather long process otherwise.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-29
SLIDE 29

◮ This simplifies what could be a rather long process otherwise. ◮ Here is our compression matrix multiplied with our initial

matrix three times to create matrix T: T =             118.1 3.9 −17.8 −9.1 62.6 −12.6 −29.4 6.4 108.8 10.5 −38.3 −40.5 −1.8 −7.0 −42.3 44.5 79.9 52.1 4.9 −9.4 −17.6 −30.9 32.4 32.6 85.9 −8.1 −27.1 9.4 17.1 −31.4 −32.9 35.1 73.6 18.9 −34.1 −8.4 20.1 −6.9 −21.4 20.9 104.6 32.5 18.5 −10.3 40.0 0.3 30.8 16.5 74.0 15.0 28.5 4.0 −42.3 −23.3 −32.8 10.8 86.0 21.3 20.3 −6.0 44.0 3.3 30.8 11.5            

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-30
SLIDE 30

Compression

◮ The process of applying the compression matrix to the initial

matrix multiple times is wavelet transform.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-31
SLIDE 31

Compression

◮ The process of applying the compression matrix to the initial

matrix multiple times is wavelet transform.

◮ This process is meant to transform data in the matrix to zero

  • r near zero.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-32
SLIDE 32

Compression

◮ The process of applying the compression matrix to the initial

matrix multiple times is wavelet transform.

◮ This process is meant to transform data in the matrix to zero

  • r near zero.

◮ A matrix is considered sparse when it is highly composed of

zeros.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-33
SLIDE 33

Compression

◮ The process of applying the compression matrix to the initial

matrix multiple times is wavelet transform.

◮ This process is meant to transform data in the matrix to zero

  • r near zero.

◮ A matrix is considered sparse when it is highly composed of

zeros.

◮ Compression involves choosing a threshold value e, let’s set

e = 20.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-34
SLIDE 34

Compression

◮ The process of applying the compression matrix to the initial

matrix multiple times is wavelet transform.

◮ This process is meant to transform data in the matrix to zero

  • r near zero.

◮ A matrix is considered sparse when it is highly composed of

zeros.

◮ Compression involves choosing a threshold value e, let’s set

e = 20.

◮ Then all numbers that fall within the absolute value of e will

be made into a zero.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-35
SLIDE 35

Compression

◮ The process of applying the compression matrix to the initial

matrix multiple times is wavelet transform.

◮ This process is meant to transform data in the matrix to zero

  • r near zero.

◮ A matrix is considered sparse when it is highly composed of

zeros.

◮ Compression involves choosing a threshold value e, let’s set

e = 20.

◮ Then all numbers that fall within the absolute value of e will

be made into a zero.

◮ This helps to maitain the images beginning integrity while

saving space or transmission time.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-36
SLIDE 36

◮ This is our matrix T after the threshold value e = 20 has been

  • applied. We’ll call it matrix D:

D =             118.1 62.6 −29.4 108.8 −38.3 −40.5 −42.3 44.5 79.9 52.1 −30.9 32.4 32.6 85.9 −27.1 −31.4 −32.9 35.1 73.6 −34.1 20.1 −21.4 20.9 104.6 32.5 40.0 30.8 74.0 28.5 −42.3 −23.3 −32.8 86.0 21.3 20.3 44.0 30.8            

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-37
SLIDE 37

◮ This is our matrix T after the threshold value e = 20 has been

  • applied. We’ll call it matrix D:

D =             118.1 62.6 −29.4 108.8 −38.3 −40.5 −42.3 44.5 79.9 52.1 −30.9 32.4 32.6 85.9 −27.1 −31.4 −32.9 35.1 73.6 −34.1 20.1 −21.4 20.9 104.6 32.5 40.0 30.8 74.0 28.5 −42.3 −23.3 −32.8 86.0 21.3 20.3 44.0 30.8            

◮ This has created 27 zero components in our matrix creating a

2:1 compression ratio.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-38
SLIDE 38

Progressive Image Transmission

◮ Progressive Image transmission utilizes the previous

techniques.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-39
SLIDE 39

Progressive Image Transmission

◮ Progressive Image transmission utilizes the previous

techniques.

◮ The compression process allows the first image we attain to

be comparable to our matrix T.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-40
SLIDE 40

Progressive Image Transmission

◮ Progressive Image transmission utilizes the previous

techniques.

◮ The compression process allows the first image we attain to

be comparable to our matrix T.

◮ Matrix T is brought up starting with the overall average,larger

detail coefficients and finally the smallest detail coefficients.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-41
SLIDE 41

Progressive Image Transmission

◮ Progressive Image transmission utilizes the previous

techniques.

◮ The compression process allows the first image we attain to

be comparable to our matrix T.

◮ Matrix T is brought up starting with the overall average,larger

detail coefficients and finally the smallest detail coefficients.

◮ T matrix initial image is crude but as more wavelet

coefficients are used the image slowly becomes an exact copy

  • f the initial image.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-42
SLIDE 42

Figure: The progressive transmission of figure 1 (3rd compression to 1st compression)

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-43
SLIDE 43

Programming Compressions with Matlab

◮ Creating compressions of large matrices, such as 256 by 256 is

difficult and time consuming by hand

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-44
SLIDE 44

Programming Compressions with Matlab

◮ Creating compressions of large matrices, such as 256 by 256 is

difficult and time consuming by hand

◮ Therefore we program the compression matrices with Matlab

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-45
SLIDE 45

Programming Compressions with Matlab

◮ Creating compressions of large matrices, such as 256 by 256 is

difficult and time consuming by hand

◮ Therefore we program the compression matrices with Matlab ◮ This is by defining the matrix as a function and writting code

for a matrix with variable dimentions

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-46
SLIDE 46

Programming Compressions with Matlab

◮ Frist we define our function and variable. Using the name

’indmat’

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-47
SLIDE 47

Programming Compressions with Matlab

◮ Frist we define our function and variable. Using the name

’indmat’

◮ we code this like

function a = indmat(n) b=[1;1]/2 c=[1;-1]/2

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-48
SLIDE 48

Programming Compressions with Matlab

◮ Frist we define our function and variable. Using the name

’indmat’

◮ we code this like

function a = indmat(n) b=[1;1]/2 c=[1;-1]/2

◮ This creates two vectors, b, and c which consists of < 1 2, 1 2 >

and < 1

2, −1 2 > respectively.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-49
SLIDE 49

Programming Compressions with Matlab

◮ next we specify the first half of the matrix which will average

the image.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-50
SLIDE 50

Programming Compressions with Matlab

◮ next we specify the first half of the matrix which will average

the image.

◮ this is

while min(size(b))< n/2 b=[b, zeros(max(size(b)),min(size(b)));... zeros(max(size(b)),min(size(b))), b]; end

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-51
SLIDE 51

Programming Compressions with Matlab

◮ next we specify the first half of the matrix which will average

the image.

◮ this is

while min(size(b))< n/2 b=[b, zeros(max(size(b)),min(size(b)));... zeros(max(size(b)),min(size(b))), b]; end

◮ Then, to specify the differencing half, we use the same code,

replacing ’c’s for the ’b’s.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-52
SLIDE 52

Programming Compressions with Matlab

◮ next we specify the first half of the matrix which will average

the image.

◮ this is

while min(size(b))< n/2 b=[b, zeros(max(size(b)),min(size(b)));... zeros(max(size(b)),min(size(b))), b]; end

◮ Then, to specify the differencing half, we use the same code,

replacing ’c’s for the ’b’s.

◮ We finally create a larger matrix out of the two of these with

a=[b,c]

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-53
SLIDE 53

Programming Compressions with Matlab

◮ Now that we have the compression matrix we apply

’indmat(256)’ to our original image. This creates the 1st compression

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-54
SLIDE 54

Programming Compressions with Matlab

◮ Now that we have the compression matrix we apply

’indmat(256)’ to our original image. This creates the 1st compression

◮ To compress again we apply the matrix

2ndcompression=[indmat(128),zeroes(128);zeroes(128),eye(128)]

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-55
SLIDE 55

Programming Compressions with Matlab

◮ Now that we have the compression matrix we apply

’indmat(256)’ to our original image. This creates the 1st compression

◮ To compress again we apply the matrix

2ndcompression=[indmat(128),zeroes(128);zeroes(128),eye(128)]

◮ For the next compression the dimention is reduced by 2 again,

but there must be more blocks. 3rdcompression=[indmat(64),zeroes(64),zeroes(64),zeroes(64); zeroes(64),eye(64),zeroes(64),zeroes(64);zeroes(64), ze- roes(64),eye(64),zeroes(64);zeroes(64),zeroes(64),zeroes(64),eye(64)]

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-56
SLIDE 56

Programming Compressions with Matlab

◮ Now that we have the compression matrix we apply

’indmat(256)’ to our original image. This creates the 1st compression

◮ To compress again we apply the matrix

2ndcompression=[indmat(128),zeroes(128);zeroes(128),eye(128)]

◮ For the next compression the dimention is reduced by 2 again,

but there must be more blocks. 3rdcompression=[indmat(64),zeroes(64),zeroes(64),zeroes(64); zeroes(64),eye(64),zeroes(64),zeroes(64);zeroes(64), ze- roes(64),eye(64),zeroes(64);zeroes(64),zeroes(64),zeroes(64),eye(64)]

◮ Thus, eventually the image becomes compressed to a

significant enough degree to be sent

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-57
SLIDE 57

The Linear Algebra of Image Compression

◮ We can generalize the averaging and differencing constituting

the compression

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-58
SLIDE 58

The Linear Algebra of Image Compression

◮ We can generalize the averaging and differencing constituting

the compression

◮ For any string the equation c1 = sA1 represents the first

compression, where A is the general compression matrix.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-59
SLIDE 59

The Linear Algebra of Image Compression

◮ We can generalize the averaging and differencing constituting

the compression

◮ For any string the equation c1 = sA1 represents the first

compression, where A is the general compression matrix.

◮ for the second compression, the equation is c2 = c1A2 ◮ the A matrix is the block matrix

A2 = A I

  • Adam L. Bruce and Alice R. Pitt

The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-60
SLIDE 60

The Linear Algebra of Image Compression

◮ We can generalize the averaging and differencing constituting

the compression

◮ For any string the equation c1 = sA1 represents the first

compression, where A is the general compression matrix.

◮ for the second compression, the equation is c2 = c1A2 ◮ the A matrix is the block matrix

A2 = A I

  • ◮ for the 3rd compression the equation is c3 = c2A3 with the A

matrix being A3 =     A I I I    

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-61
SLIDE 61

The Linear Algebra of Image Compression

◮ in general the equation for the nth compression will be

cn = cn−1An

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-62
SLIDE 62

The Linear Algebra of Image Compression

◮ in general the equation for the nth compression will be

cn = cn−1An

◮ The matrix An is

cn = cn−1        A . . . I . . . I . . . . . . . . . . . . ... . . . . . . I2n−1−1       

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-63
SLIDE 63

The Linear Algebra of Image Compression

◮ We can multiply all of the A matrices together to do the

entire series of compressions in one step

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-64
SLIDE 64

The Linear Algebra of Image Compression

◮ We can multiply all of the A matrices together to do the

entire series of compressions in one step

◮ We call this W and say that W = A1A2A3 . . . An where n is

the total amount of compressions.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-65
SLIDE 65

The Linear Algebra of Image Compression

◮ We can multiply all of the A matrices together to do the

entire series of compressions in one step

◮ We call this W and say that W = A1A2A3 . . . An where n is

the total amount of compressions.

◮ So the equation c = sW , where c is the complete compression

  • f the image, will do all of the avereging and differencing in
  • ne step.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-66
SLIDE 66

The Linear Algebra of Image Compression

◮ The beauty of this process is that it is invertable; once

compressed, the original image can be reconstructed from the compression.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-67
SLIDE 67

The Linear Algebra of Image Compression

◮ The beauty of this process is that it is invertable; once

compressed, the original image can be reconstructed from the compression.

◮ Not suprisingly, the equation s = cW −1 does this.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-68
SLIDE 68

The Linear Algebra of Image Compression

◮ The beauty of this process is that it is invertable; once

compressed, the original image can be reconstructed from the compression.

◮ Not suprisingly, the equation s = cW −1 does this. ◮ This is called the Inverse Haar Wavelet Transform.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-69
SLIDE 69

The Linear Algebra of Image Compression

◮ The beauty of this process is that it is invertable; once

compressed, the original image can be reconstructed from the compression.

◮ Not suprisingly, the equation s = cW −1 does this. ◮ This is called the Inverse Haar Wavelet Transform. ◮ For the general case, the equation

W −1 = A−1

n A−1 n−1A−1 n−2 . . . A−1 1

gives the matrix W

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-70
SLIDE 70

The Linear Algebra of Image Compression

◮ For a String of length 2n, W must have a dimension of n by

n, and therefore so must the A matrices. Also note that n matrices are neededto completely compress the image.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-71
SLIDE 71

The Linear Algebra of Image Compression

◮ For a String of length 2n, W must have a dimension of n by

n, and therefore so must the A matrices. Also note that n matrices are neededto completely compress the image.

◮ We can derive a product series which aids in the calculation of

W and W −1 for strings of various lengths.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-72
SLIDE 72

The Linear Algebra of Image Compression

◮ This is

W =

n

  • i=1

       A . . . I . . . I . . . . . . . . . . . . ... . . . . . . I2i−1−1        and W −1 =

1

  • i=n

       A . . . I . . . I . . . . . . . . . . . . ... . . . . . . I2i−1−1       

−1

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-73
SLIDE 73

The Linear Algebra of Image Compression

◮ This is

W =

n

  • i=1

       A . . . I . . . I . . . . . . . . . . . . ... . . . . . . I2i−1−1        and W −1 =

1

  • i=n

       A . . . I . . . I . . . . . . . . . . . . ... . . . . . . I2i−1−1       

−1 ◮ The general A matrix represented here is in blocks, the

dimension of which are D/2i−1 where D is the original dimension of the image.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-74
SLIDE 74

The Linear Algebra of Image Compression

◮ Up to this point we have only been averaging the rows of the

entire matrix (which we have called strings). Now we will talk about how to average the columns.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-75
SLIDE 75

The Linear Algebra of Image Compression

◮ Up to this point we have only been averaging the rows of the

entire matrix (which we have called strings). Now we will talk about how to average the columns.

◮ What we have computed so far is called the row-reduced form

  • f a matrix. The complete compression will be a

row-and-column-reduced form.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-76
SLIDE 76

The Linear Algebra of Image Compression

◮ Up to this point we have only been averaging the rows of the

entire matrix (which we have called strings). Now we will talk about how to average the columns.

◮ What we have computed so far is called the row-reduced form

  • f a matrix. The complete compression will be a

row-and-column-reduced form.

◮ the simplest way to do this is by transposing our equations

T = ((PW )TW )T = W TPW and P = ((T)TW −1)T = (W −1)TTW −1 Where T is the compressed image, and P is the original.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-77
SLIDE 77

The Linear Algebra of Image Compression

◮ Up to this point we have only been averaging the rows of the

entire matrix (which we have called strings). Now we will talk about how to average the columns.

◮ What we have computed so far is called the row-reduced form

  • f a matrix. The complete compression will be a

row-and-column-reduced form.

◮ the simplest way to do this is by transposing our equations

T = ((PW )TW )T = W TPW and P = ((T)TW −1)T = (W −1)TTW −1 Where T is the compressed image, and P is the original.

◮ If we normalized the columns of W we could simplify this

even more, because the columns would then be orthonormal, making W an orthogonal matrix, thus W −1 = W T.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-78
SLIDE 78

The Linear Algebra of Image Compression

◮ Then the equation for P would be

P = ((T)TW −1

  • )T = (W −1
  • )TTW −1
  • = (W T
  • )TTW T
  • = WoTW T
  • Adam L. Bruce and Alice R. Pitt

The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-79
SLIDE 79

The Linear Algebra of Image Compression

◮ Then the equation for P would be

P = ((T)TW −1

  • )T = (W −1
  • )TTW −1
  • = (W T
  • )TTW T
  • = WoTW T
  • ◮ This is now much easier to calculate than before, which would
  • ptimize the use of a computer’s capacity if it was to be

included in an algorithm.

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-80
SLIDE 80

Questions

◮ Any questions?

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation

slide-81
SLIDE 81

Bibliography

Colm Mulcahy. Image Compression Using the Haar Wavelet Transform

Adam L. Bruce and Alice R. Pitt The Structure of Digital Imaging: The Haar Wavelet Transformation