斯坦福机器视觉CS131

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

LinearAlgebraReviewFei-FeiLiLinearAlgebraPrimerProfessorFei-FeiLiStanfordVisionLab2-Apr-201Another,veryin-depthlinearalgebrareviewfromCS229isavailablehere:(lectures3and4):=17005383-19c6-49ed-9497-2ba8bfcfe5f6LinearAlgebraReviewFei-FeiLiOutline•Vectorsandmatrices–BasicMatrixOperations–SpecialMatrices•TransformationMatrices–Homogeneouscoordinates–Translation•Matrixinverse•Matrixrank•SingularValueDecomposition(SVD)–Useforimagecompression–UseforPrincipalComponentAnalysis(PCA)–Computeralgorithm2-Apr-202LinearAlgebraReviewFei-FeiLiOutline•Vectorsandmatrices–BasicMatrixOperations–SpecialMatrices•TransformationMatrices–Homogeneouscoordinates–Translation•Matrixinverse•Matrixrank•SingularValueDecomposition(SVD)–Useforimagecompression–UseforPrincipalComponentAnalysis(PCA)–Computeralgorithm2-Apr-203Vectorsandmatricesarejustcollectionsoforderednumbersthatrepresentsomething:movementsinspace,scalingfactors,pixelbrightnesses,etc.We’lldefinesomecommonusesandstandardoperationsonthem.LinearAlgebraReviewFei-FeiLiVector•Acolumnvectorwhere•Arowvectorwheredenotesthetransposeoperation2-Apr-204LinearAlgebraReviewFei-FeiLiVector•We’lldefaulttocolumnvectorsinthisclass•You’llwanttokeeptrackoftheorientationofyourvectorswhenprogramminginMATLAB•YoucantransposeavectorVinMATLABbywritingV’.(Butinclassmaterials,wewillalwaysuseVTtoindicatetranspose,andwewilluseV’tomean“Vprime”)2-Apr-205LinearAlgebraReviewFei-FeiLiVectorshavetwomainuses•Vectorscanrepresentanoffsetin2Dor3Dspace•Pointsarejustvectorsfromtheorigin2-Apr-206•Data(pixels,gradientsatanimagekeypoint,etc)canalsobetreatedasavector•Suchvectorsdon’thaveageometricinterpretation,butcalculationslike“distance”canstillhavevalueLinearAlgebraReviewFei-FeiLiMatrix•Amatrixisanarrayofnumberswithsize𝑚↓by𝑛→,i.e.mrowsandncolumns.•If,wesaythatissquare.2-Apr-207LinearAlgebraReviewFei-FeiLiImages2-Apr-208•MATLABrepresentsanimageasamatrixofpixelbrightnesses•NotethatmatrixcoordinatesareNOTCartesiancoordinates.Theupperleftcorneris[y,x]=(1,1)=LinearAlgebraReviewFei-FeiLiColorImages•Grayscaleimageshaveonenumberperpixel,andarestoredasanm×nmatrix.•Colorimageshave3numbersperpixel–red,green,andbluebrightnesses•Storedasanm×n×3matrix2-Apr-209=LinearAlgebraReviewFei-FeiLiBasicMatrixOperations•Wewilldiscuss:–Addition–Scaling–Dotproduct–Multiplication–Transpose–Inverse/pseudoinverse–Determinant/trace2-Apr-2010LinearAlgebraReviewFei-FeiLiMatrixOperations•Addition–Canonlyaddamatrixwithmatchingdimensions,orascalar.•Scaling2-Apr-2011LinearAlgebraReviewFei-FeiLiMatrixOperations•Innerproduct(dotproduct)ofvectors–Multiplycorrespondingentriesoftwovectorsandadduptheresult–x·yisalso|x||y|Cos(theanglebetweenxandy)2-Apr-2012LinearAlgebraReviewFei-FeiLiMatrixOperations•Innerproduct(dotproduct)ofvectors–IfBisaunitvector,thenA·BgivesthelengthofAwhichliesinthedirectionofB2-Apr-2013LinearAlgebraReviewFei-FeiLiMatrixOperations•Multiplication•TheproductABis:•Eachentryintheresultis(thatrowofA)dotproductwith(thatcolumnofB)•Manyuses,whichwillbecoveredlater2-Apr-2014LinearAlgebraReviewFei-FeiLiMatrixOperations•Multiplicationexample:2-Apr-2015–Eachentryofthematrixproductismadebytakingthedotproductofthecorrespondingrowintheleftmatrix,withthecorrespondingcolumnintherightone.LinearAlgebraReviewFei-FeiLiMatrixOperations•Powers–Byconvention,wecanrefertothematrixproductAAasA2,andAAAasA3,etc.–Obviouslyonlysquarematricescanbemultipliedthatway2-Apr-2016LinearAlgebraReviewFei-FeiLiMatrixOperations•Transpose–flipmatrix,sorow1becomescolumn1•Ausefulidentity:2-Apr-2017LinearAlgebraReviewFei-FeiLi•Determinant–returnsascalar–Representsarea(orvolume)oftheparallelogramdescribedbythevectorsintherowsofthematrix–For,–Properties:2-Apr-2018MatrixOperationsLinearAlgebraReviewFei-FeiLi•Trace–Invarianttoalotoftransformations,soit’susedsometimesinproofs.(Rarelyinthisclassthough.)–Properties:2-Apr-2019MatrixOperationsLinearAlgebraReviewFei-FeiLiSpecialMatrices•IdentitymatrixI–Squarematrix,1’salongdiagonal,0’selsewhere–I∙[anothermatrix]=[thatmatrix]•Diagonalmatrix–Squarematrixwithnumbersalongdiagonal,0’selsewhere–Adiagonal∙[anothermatrix]scalestherowsofthatmatrix2-Apr-2020LinearAlgebraReviewFei-FeiLiSpecialMatrices•Symmetricmatrix•Skew-symmetricmatrix2-Apr-2021LinearAlgebraReviewFei-FeiLiOutline•Vectorsandmatrices–BasicMatrixOperations–SpecialMatrices•TransformationMatrices–Homogeneouscoordinates–Translation•Matrixinverse•Matrixrank•SingularValueDecomposition(SVD)–Useforimagecompression–UseforPrincipalComponentAnalysis(PCA)–Computeralgorithm2-Apr-2022Matrixmultiplicationcanbeusedtotransformvectors.Amatrixusedinthiswayiscalledatransformationmatrix.LinearAlgebraReviewFei-FeiLiTransformation•Matricescanbeusedtotransformvectorsinusefulways,throughmultiplication:x’=Ax•Simplestisscaling:(Verifytoyourselfthatthematrixmultiplicationworksoutthisway)2-Apr-2023LinearAlgebraReviewFei-FeiLiRotation•Howcanyouconvertavectorrepresentedinfr

1 / 77
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功