62
Image Compression Image Compression S S V V D D Defuses the Bomb Defuses the Bomb

Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

  • View
    224

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Image CompressionImage CompressionSSVVDDDefuses the BombDefuses the Bomb

Page 2: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Where Where MathematicsMathematicsand and Classical ArtClassical Artcome together tocome together tocombat combat terrorismterrorism

Page 3: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Dusty WilsonDusty Wilson

Western Washington UniversityWestern Washington UniversityGraduate Student InstructorGraduate Student Instructor

Page 4: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism
Page 5: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

In the midst of the political

unrest in Russia, many

nuclear warheads have

mysteriously disappeared

Russian Nuclear FacilitiesRussian Nuclear Facilities

Page 6: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Some missiles are believed inthe hands ofanti-Americanterrorist groups

Page 7: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

In the interest of nationalIn the interest of nationalsecurity, the CIA has worked security, the CIA has worked with the Russians to neutralizewith the Russians to neutralizethe terrorist threat.the terrorist threat.

Page 8: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Extreme politicalparanoia in Russia led to fitting their missiles with safety mechanisms.

Page 9: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Deactivationcodes - 11 digitphone numbers -were encryptedin classical art.

Page 10: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Creation of Adam

O 15 = 5 mod(10)55o

Page 11: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

We hold thekey to decodewhat is lockedin the images.

Page 12: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

However, the images areHowever, the images arestored remotely and westored remotely and wemust access them beforemust access them beforewe can decode the keywe can decode the key

Page 13: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

There is a ten minutewindow for us to access the imagesand deactivate theterrorist missiles.

Page 14: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

For this, we needpowerful andeffective imagecompression.

Page 15: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Image Compression

An application of the

Singular

Value

Decomposition

Theorem

Page 16: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

The Way It Works.SVDImage Compression

Page 17: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

ImageImage

ArrayArray

jim

,

Page 18: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Every color has a red, green, and blue (RGB) component.

ji

ji

ji

jim

,

,

,

,

b

g

r

where each ri,j is the i,jth

component of the matrix R.

Define G and B in a similar

manner.

Page 19: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

ImageImage

RRGG

BB

Page 20: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

R is real valued and has rank r.

B

G

R

M

For simplicity, consider R

Page 21: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

TheSingularValueDecompositionTheorem

Page 22: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Any real valued matrix is the product of orthonormal and diagonal matrices.

TVU rrrR

where the rank of R is r, Ur and Vr are orthonormal, and Σr is an ordered diagonal matrix

Page 23: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

OrthonormalandDiagonalMatrices

What are they, and how hard do they bite?

Page 24: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Orthonormal

cossin

sincosrotates

y

xby θ.

For example, the orthonormal matrixVisualize orthonormal matrices as rotations.

Page 25: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

DiagonalVisualize diagonal transformations

as a component-wise stretches

20

03maps

y

xinto

y

x

2

3For example:

Page 26: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

A diagonal matrix is ordered if

r

r

00

0

0

00

2

1

where r 21

Page 27: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

An Example ofTheSingularValueDecompositionTheorem

Page 28: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Let R be

43

211

49

43

R

where R has rank 2

Page 29: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

The singular value decom-position of R is:

23

21

21

23

20

03

21

23

23

21

TVUR222

Page 30: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Which we recognize as

)

3sin()

3cos(

)3

cos()3

sin(

20

03

)3

2sin()3

2cos(

)3

2cos()3

2sin(

Page 31: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

With fiddling, this is equal to

)6

cos()6

sin(

)6

sin()6

cos(

20

03)

3cos()

3sin(

)3

sin()3

cos(

Page 32: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

We visualize:

1.) A rotation by

2.) A diagonal stretch

3.) A rotation by

6

3

Page 33: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

This can be seenin the followingMathematicaanimation

Page 34: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

How does SVD apply toImageCompression ?

Page 35: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Recall that RR was the redcomponent of an imageImageImage

GGBB

RR

Page 36: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Trv

Tv

r

ruu

12

1

1

00

0

0

00

...

TrvrurTvuTvu

222111

By the SVD TheoremTVUR rrr

Page 37: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

So SVD says:TrvrurTvuTvuR

222111

But Image Compression???

Page 38: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Approximate R with

TvuR1111

TvuTvuR2221112

TvuTvuTvuR rrrr

222111

and continue on to

Page 39: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

In particular, Rr = R

TvuTvuTvuRkkkk

222111

We have that

Page 40: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Choose the k such

that Rk approximatesR to the desired degree

Page 41: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

We measure the quality ofan approximation by oursatisfaction with thecompressed image

Page 42: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

This is illustratedin the followingexample

Consider approximations of R

RR

Page 43: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

22

11

4466

881010

3355

7799

Page 44: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

22

11

4466

881010

3355

7799

Again

Page 45: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

How much does SVDcompress an image?

What would we besatisfied with?

Page 46: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Each iteration costs0.59% in storage

10 iterations = 5.9%

Page 47: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

The determine what percentof the original image is gainedat each iteration.

This can be seen in thefollowing graph.

Page 48: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

10 iterations gives 71.3%

Page 49: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

100%100%

5.9%5.9%

OriginalApproximation

Page 50: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

So what are the drawbacks?

Computing Power -

Page 51: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

SVD requires more powerthan any groups other thanthe government, military, andsome research institutes have.

Page 52: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

For Example, the SVD ofthis image required 28 seconds

On a Pentium II operating at 300mhzwith 128mb of RAMon MATLAB v6

Page 53: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

More dramatically, SVD on this image took 6 min 31 sec

On a Pentium II operating at 300mhzwith 128mb of RAMon MATLAB v6

Page 54: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Now that the power andlimitations of SVD areevident, it is time to saveour nation from terrorists

Page 55: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism
Page 56: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Solutions(1) American Gothic(3) Mona Lisa(6) Last Supper(0) Old Guitar Player(6) Praying Hands(5) Washington Crossing

the Delaware

(0) Sunday Afternoon OnLa Grande Jatte

(4) David(8) The Thinker(3) The Scream(6) Waterfall

Feel free to call 1 (360) 650- 4836 to confirm thatthe world is safe once more for the American people. (You are also free to call and chat;-)

Page 57: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Now that the world issafe from terrorists andI have explained singularvalue decomposition ...

Page 58: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Special thanks toSpecial thanks toCharlene WilsonCharlene Wilsonmy wonderful wifemy wonderful wife

Dr. John WollDr. John Wollmy academic advisormy academic advisor

Page 59: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Additional thanks toAdditional thanks toPeter CaldwellPeter CaldwellAlison Haukaas Alison Haukaas Audrey KalinowskiAudrey KalinowskiDoug RonneDoug RonneVika SavaleiVika SavaleiNathaniel WilsonNathaniel Wilson

Dean J Alan RossDean J Alan Ross Travel FundTravel FundDr. Tjalling YpmaDr. Tjalling YpmaMath Dept. StaffMath Dept. StaffWWU Graduate WWU Graduate School StaffSchool Staff

Page 60: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Dusty WilsonDusty Wilson

Graduate Student InstructorGraduate Student InstructorWestern Washington UniversityWestern Washington University(360) 756-8309(360) [email protected]@yahoo.com

Page 61: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism
Page 62: Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat terrorism

Historical NotesHistorical Notes

SVD was independently discovered andSVD was independently discovered andrediscovered a number of times including: rediscovered a number of times including:

Eugenio Beltrami (1835-1899) in 1873Eugenio Beltrami (1835-1899) in 1873M.E. Camille Jordan (1838-1922) in 1875M.E. Camille Jordan (1838-1922) in 1875James J. Sylvester (1814-1897) in 1889James J. Sylvester (1814-1897) in 1889L. Autonne in 1913L. Autonne in 1913C. Eckart and G. Young in 1936C. Eckart and G. Young in 1936