Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat...
-
date post
19-Dec-2015 -
Category
Documents
-
view
224 -
download
2
Transcript of Image Compression SVD Defuses the Bomb. Where Mathematics and Classical Art come together to combat...
Image CompressionImage CompressionSSVVDDDefuses the BombDefuses the Bomb
Where Where MathematicsMathematicsand and Classical ArtClassical Artcome together tocome together tocombat combat terrorismterrorism
Dusty WilsonDusty Wilson
Western Washington UniversityWestern Washington UniversityGraduate Student InstructorGraduate Student Instructor
In the midst of the political
unrest in Russia, many
nuclear warheads have
mysteriously disappeared
Russian Nuclear FacilitiesRussian Nuclear Facilities
Some missiles are believed inthe hands ofanti-Americanterrorist groups
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.
Extreme politicalparanoia in Russia led to fitting their missiles with safety mechanisms.
Deactivationcodes - 11 digitphone numbers -were encryptedin classical art.
Creation of Adam
O 15 = 5 mod(10)55o
We hold thekey to decodewhat is lockedin the images.
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
There is a ten minutewindow for us to access the imagesand deactivate theterrorist missiles.
For this, we needpowerful andeffective imagecompression.
Image Compression
An application of the
Singular
Value
Decomposition
Theorem
The Way It Works.SVDImage Compression
ImageImage
ArrayArray
jim
,
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.
ImageImage
RRGG
BB
R is real valued and has rank r.
B
G
R
M
For simplicity, consider R
TheSingularValueDecompositionTheorem
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
OrthonormalandDiagonalMatrices
What are they, and how hard do they bite?
Orthonormal
cossin
sincosrotates
y
xby θ.
For example, the orthonormal matrixVisualize orthonormal matrices as rotations.
DiagonalVisualize diagonal transformations
as a component-wise stretches
20
03maps
y
xinto
y
x
2
3For example:
A diagonal matrix is ordered if
r
r
00
0
0
00
2
1
where r 21
An Example ofTheSingularValueDecompositionTheorem
Let R be
43
211
49
43
R
where R has rank 2
The singular value decom-position of R is:
23
21
21
23
20
03
21
23
23
21
TVUR222
Which we recognize as
)
3sin()
3cos(
)3
cos()3
sin(
20
03
)3
2sin()3
2cos(
)3
2cos()3
2sin(
With fiddling, this is equal to
)6
cos()6
sin(
)6
sin()6
cos(
20
03)
3cos()
3sin(
)3
sin()3
cos(
We visualize:
1.) A rotation by
2.) A diagonal stretch
3.) A rotation by
6
3
This can be seenin the followingMathematicaanimation
How does SVD apply toImageCompression ?
Recall that RR was the redcomponent of an imageImageImage
GGBB
RR
Trv
Tv
r
ruu
12
1
1
00
0
0
00
...
TrvrurTvuTvu
222111
By the SVD TheoremTVUR rrr
So SVD says:TrvrurTvuTvuR
222111
But Image Compression???
Approximate R with
TvuR1111
TvuTvuR2221112
TvuTvuTvuR rrrr
222111
and continue on to
In particular, Rr = R
TvuTvuTvuRkkkk
222111
We have that
Choose the k such
that Rk approximatesR to the desired degree
We measure the quality ofan approximation by oursatisfaction with thecompressed image
This is illustratedin the followingexample
Consider approximations of R
RR
22
11
4466
881010
3355
7799
22
11
4466
881010
3355
7799
Again
How much does SVDcompress an image?
What would we besatisfied with?
Each iteration costs0.59% in storage
10 iterations = 5.9%
The determine what percentof the original image is gainedat each iteration.
This can be seen in thefollowing graph.
10 iterations gives 71.3%
100%100%
5.9%5.9%
OriginalApproximation
So what are the drawbacks?
Computing Power -
SVD requires more powerthan any groups other thanthe government, military, andsome research institutes have.
For Example, the SVD ofthis image required 28 seconds
On a Pentium II operating at 300mhzwith 128mb of RAMon MATLAB v6
More dramatically, SVD on this image took 6 min 31 sec
On a Pentium II operating at 300mhzwith 128mb of RAMon MATLAB v6
Now that the power andlimitations of SVD areevident, it is time to saveour nation from terrorists
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;-)
Now that the world issafe from terrorists andI have explained singularvalue decomposition ...
Special thanks toSpecial thanks toCharlene WilsonCharlene Wilsonmy wonderful wifemy wonderful wife
Dr. John WollDr. John Wollmy academic advisormy academic advisor
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
Dusty WilsonDusty Wilson
Graduate Student InstructorGraduate Student InstructorWestern Washington UniversityWestern Washington University(360) 756-8309(360) [email protected]@yahoo.com
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