Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
GEOG4110/5100AdvancedRemoteSensing
Lecture16
1GEOG4110/5100
• Review:PrincipalComponentAnalysis• Displacementfromfeaturetracking
*Formoreinformationonworkingwithmatrices,refertoRichards,AppendixA)
MultispectralTransformationsofImageData
• Itispossibletotransformbrightnessdatathroughlinearoperationsonthesetofspectralbands– Canmakeimagefeaturesvisiblethatarenotdiscernableinthe
originaldata– Canpreserveimagequalityareducednumberoftransformed
dimensions• E.g.fordisplayonacolormonitor
• PrincipalComponenttransformation– Seekstominimizecorrelationinordertominimizeredundancyof
spectralbands
GEOG4110/5100 2
http://www.ce.yildiz.edu.tr/personal/songul/file/1097/principal_components.pdf
forafairlysimpleexplanation:
PrincipalComponents• Seeknewcoordinatesysteminvectorspaceinwhichdatacan
berepresentedwithoutcorrelation– Covariancematrixisdiagonal
GEOG4110/5100 3
y = Gx = Dtx
MeanVectorandCovariance
GEOG4110/5100 4
Themeanvector(m)isthevectoraverageoftheindividualcomponentsofavector
Cov(X,Y ) =1
n 1(Xi x )(Yi y )
i=1
n
Thecovariancebetweentworeal-valuedrandomdescribeshowonevariablevariesinrelationtoanother.
C = 1n−1
(Xi − x )(Xi − x )i=1
n
∑xT
∑- -
RelationshipBetweenx andy CovarianceMatrices
GEOG4110/5100 5
y = Gx = Dtx
Sy = ξ[(y-my)(y-my)t]
my = ξ[y] = ξ[Dtx] = Dtξ [x] = Dtmx
Sy = ξ[(Dtx-Dtmx)(Dtx-Dtmx)t]
Sy = Dtξ[(x-mx)(x-mx)t]D
Sy = DtSxDSx isthecovarianceofthepixeldatainxspace(Sy in y)
- mx andmy arethemeanvectorsinxandyrespectively
- ξ istheExpectedvalue(heretakenasthemeanform)
Each component of y is a linear combination of all of the elements of x; the weighting coefficients are the elements of the matrix G (or DT)
IdentifyingaycoordinatespaceinwhichthepixeldataexhibitsnocorrelationrequiresSy tobeadiagonalmatrix
EigenvaluesandEigenvectors
GEOG4110/5100 6
http://math.mit.edu/linearalgebra/ila0601.pdf (morecomplexexplanation)http://www.ce.yildiz.edu.tr/personal/songul/file/1097/principal_components.pdf (simpleexplanation)
Eigenvector
Eigenvalue
Whenwehaveatransformationmatrixoperatingonavector,anewvectorisproduced:
Sometimesthatnewvectorissimplytheproductofascalarandtheoriginalvector
Whenthisisthecase,thescalarisreferredtoastheEigenvalue,andthevectorisreferredtoastheEigenvector
Eigenvalues andEigenvectors• Eigenvalues (l)andeigenvectors(x)ofaMatrix(M)arescalar
andvectortermssuchthatthemultiplicationofx byl hasthesameresultasthematrixtransformationofx bymatrixM
GEOG4110/5100 7
Mx = lx (i.e. y = lx is equivalent to y = Mx)or
Mx - lx = 0 à (M-lI)x =0; where I is the identity matrix(x is a vector with n elements, where n = number of bands)
For the above to be true, then either x = 0 or
|M-lI | = 0
This is the “characteristic equation” from which the eigenvalues(l) can be determinedWhen plugged into the equation: (M-lI)x =0, the eigenvectors(x) can be determined
CalculatingDeterminants
From:http://www.mathsisfun.com/algebra/matrix-determinant.html
PrincipalComponentTransformation
GEOG4110/5100 9
Sy = DtSxD
- Sx isthecovarianceofthepixeldatainx space- DisamatrixofEigenvectorsderivedfromSx- Thecovariancematrixiny-spaceisgivenby:
Thenth component(n =1…N)representsz percentofthevariancewhere
- Sy is by definition a diagonal covariance matrix with its elements representing the variance in the transformed coordinates
- The greatest variance occurs in the first dimension of the transformed coordinate system, the next greatest in the 2nd, and so-on such that the least variance is found in the nth dimension
€
=y∑
λ1 0 00 λ2 0 0 0 λN
$
%
& & & &
'
(
) ) ) )
WhereNisthedimensionality,andlirepresentstheeigenvalues indescendingorder
€
ζ n =λn
λ1 + λ2...+ λn
PrincipalComponentTransformation
• Theeigenvectorsdeterminethetransformationmatrixthatproduceseachprincipalcomponent
• Theeigenvaluedescribesthepercentageofthevariancethatiscontainedwithineachprincipalcomponent– Thehighertheeigenvalueasafractionofthesumoftheeigenvalues,
themorerelativeinformationiscontainedinthecorrespondingprincipalcomponent
GEOG4110/5100 10
PrincipalComponentsTransformationExamplein2dimensions
GEOG4110/5100 11
€
=x∑1.9 1.11.1 1.1#
$ %
&
' (
€
=x∑2.40 00 1.87
#
$ %
&
' (
PrincipalComponentsTransformationExamplein2dimensions
GEOG4110/5100 12
€
=x∑1.9 1.11.1 1.1#
$ %
&
' (
Firstweneedtofindtheeigenvalues |Sx –lI| = 0
l2- 3.0l + 0.88 = 0 à l =2.67and0.33
€
1.9 − λ 1.11.1 1.1− λ
= 0
PrincipalComponentsTransformationExamplein2dimensions
GEOG4110/5100 13
=y∑
2.67 00 0.33
"
#$
%
&'
Firstcomponentcontains2.67/(2.67+0.33)=89%ofthevarianceinthisexample(usuallyweordertheeigenvaluesindescendingorder)
NowweseektofindtheprincipalcomponentstransformationmatrixG=DT
WhereDT isthetransposedmatrixofeigenvectors.
Thefirsteigenvector(g1)correspondstothefirsteigenvalue l1
[Sx –lI]g1 = 0 with for the two dimensional case
Substituting Sx and l1 (2.67) gives the pair of equations:-0.77g11 + 1.10g21 = 01.10g11 – 1.57g21 = 0
yieldsg11=1.43g21
€
g1 =g11g21
"
# $
%
& ' = d1
t
PrincipalComponentsTransformationExamplein2dimensions
GEOG4110/5100 14
Wehavetheaddedconstraintthattheeigenvectorsmustbenormalized(i.e.theGmatrixmustbeorthogonalsuchthatGt =G-1)
(g11)2 + (g21)2 =1
Thisproducesthefollowingeigenvectors
Whichinturnproducethefollowingtransformationmatrix€
g1 =0.820.57"
# $
%
& '
€
g2 =−0.570.82#
$ %
&
' (
G = Dt = 0.82 −0.570.57 0.82
"
#$
%
&'
t
= 0.82 0.57−0.57 0.82
"
#$
%
&'
Remember,Disthematrixofeigenvectors
g2 isthe2nd eigenvectorderivedfromthe2nd eigenvalue(replace2.67onpreviouspagewith0.33)
GEOG4110/5100 15
PrincipalComponentsTransformation
Examplein2dimensions
(a)FourLandat MSSbansfortheregionofAndamooka inCentralAustralia;(b)Thefourprincipalcomponentsoftheimagesegment;(c)comparisonofstandardfalsecolorcomposite(R=band7;G=band5;B=band4)withaprincipalcomponentcomposite(R,G,Bare1st,2nd,and3rd componentsrespectively)
ba
c
a
b c d
e
17
Highlycorrelatedbands1,2,and3
a
b c d
e
18
Bands4,3,2 PC3,PC2,PC1 PC4,PC3,PC2
a
b c d
e
19
PrincipalComponentTransformationSteps1. Computethecovariancematrixofthedatasetinvectorspace2. Calculatetheeigenvaluesofthecovariancematrix3. Thediagonalmatrixwiththeeigenvaluesalongthediagonalwillbethe
covariancematrixofthetransformedaxes(principalcomponentaxes)4. Findthematrixofeigenvectors(Di)foreach individual l of interest by
solvingfor[Sx –liI]gi = 0. for that l.5. Transpose the Matrix D to produce principal component transformation
matrix (g). The number of rows in g will equal the number of spectral dimensions from which the eigenvalues and eigenvectors were calculated
6. For each g matrix (derived from a given l) the original data values (in original x coordinate system) are multiplied by the rows in g (g1, g2, … gnwhere n is the number of dimensions in vector space), to produce coordinates in the transformed dimension (new y coordinate system). Each axis in the original spectral space will be multiplied by its corresponding row in the g matrix to produce the transformed coordinate system (principal component)
7. Steps 4 – 6 are repeated until the desired number of principal component transformations have been executed.
• PCAisatechniquethattransformstheoriginalvectorimagedataintosmallersetofuncorrelatedvariables.
• Thevariablesrepresentmostoftheimageinformationandeasiertointerpret.
• PrincipalcomponentsarederivedsuchthatthefirstPCaccountsformuchofthevariationoftheoriginaldata.Thesecond(vertical)accountsformostoftheremainingvariation.
• PCAisusefulinreducingthedimensionality(numberofbands)thatusedforanalysis.Minimumnoisefraction(MNF)methodcanbeusedwithhyperspectral datafornoisereduction.
GEOG4110/5100 21
PrincipalComponentsAnalysis(PCA)
TMExampleforPCTransformation
• Computethen-dimensionalcovariancematrix(7x7forLandsat TM).
• Thevariancesoftheprincipalcomponents(eigenvalues)containusefulinformation(e.g.determinethe%oftotalvarianceexplainedbyeachoftheprincipalcomponents)
GEOG4110/5100 22
BandNumber
1 2 3 4 5 7 6
Variance 100.93 34.14 68.83 248.40 568.84 154.92 17.78
TableshowsthevarianceofdifferentbandsofTMscene.AdaptedfromJensen,2005.
eigenvalueofthepth component
sumoftheeigenvalueofallcomponents
Componentp(eigenvalues)
1 2 3 4 5 6 7
eigenvalue 1010.92 131.20 37.60 6.73 3.95 2.17 1.24
23
TMExampleforPCTransformation
Sumofeigenvaluesofallcomponents=1193.81%ofvarianceexplainedbyPC1=(1010.92/1193.81)*100=84.68%%ofvarianceexplainedbyPC2=(131.2/1193.81)*100=10.99%
Tableshowsthevarianceofdifferentprincipalcomponents.AdaptedfromJensen,2005.
Band Componentp
1 2 3 4 5 6 7
1 0.205 0.637 0.327 -0.054 0.249 -0.611 -0.079
2 0.127 0.342 0.169 -0.077 0.012 0.396 0.821
3 0.204 0.428 0.159 -0.076 -0.075 0.649 -0.562
4 0.443 -0.471 0.739 0.107 -0.153 -0.019 -0.004
5 0.742 -0.177 -0.437 -0.300 0.370 0.007 0.011
7 0.376 0.197 -0.309 -0.312 -0.769 -0.181 0.051
6 0.106 0.033 -0.080 0.887 0.424 0.122 0.005
Tableshowstheeigenvectors(coefficients)foreachprincipalcomponentineachcolumn.AdaptedfromJensen,2005.
• Thecorrelationofeachbandwitheachcomponentpiscalculatedtodeterminewhichbandisassociatedwitheachprincipalcomponent.Thishelpsinunderstandingtheinformationcontainsbyeachcomponent.
Howprincipalcomponentimagesarecreated?• Identifytheoriginalbrightnessvaluesofagivenpixel(e.g.the
firstpixelatcolumn1androw1).• Obtainthenewpixelvaluebysummationofthe
multiplicationoftheeigenvectorofthecomponentofeachbandbytheoriginalvalue
GEOG4110/5100 24
TMExampleforPCTransformation