西南科技大学本科生毕业论文I基于PCA及其改进算法的人脸图像压缩与重建摘要:首先介绍了主成分分析(PCA)算法的基本原理,提出了利用PCA进行图像数据压缩与重建的基本模型。主成分分析方法从矩阵角度也称为K-L变换。首先将图像训练库里的每个二维图像拉伸成向量,然后对其进行主成分分析得到主成份的变换矩阵以及图像均值向量。图像压缩过程就是把压缩的图像减去训练得到的图像均值向量并通过变换矩阵变换成维数很小的一个向量的过程。图像的重建就是将压缩的图像通过变换矩阵的逆变换矩阵的逆变换后再加上图像均值向量得到的压缩前向量的近似向量。然后介绍了一系列的主成分分析方法的改进算法。其中包括MatPCA算法、2DPCA算法、ModulePCA算法等。其中ModulePCA算法是将每一个训练图像都划分成一些尺寸大小一样的子图像,将所有训练图像的所有子图像集合在一起进行PCA分析,得到相应的总体协方差矩阵。在对测试图像进行压缩时,首先按照训练图像那样的划分方法将测试图像划分成子图像,然后逐个对子图像进行压缩。重建时逐个对压缩的子图像进行重建,然后再拼接成原来的图像。实验结果表明,利用模块化PCA能有效减少数据的维数,实现图像压缩,同时能根据实际需要重建图像。关键词:图像压缩;图像重建;PCA;特征提取西南科技大学本科生毕业论文IIFaceimagecompressionandreconstructionbaseonPCAandimprovedPCAalgorithmAbstract:First,ThisarticlehaveintroducedthebasicprincipleofPCA,andithasproposedthebasicmoduleofusingPCAtocompressandreconstructtheimagedata.PrincipalcomponentanalysisisalsoknownasK-Ltransformationfromtheperspectiveofmatrix.First,eachofthetwo-dimensionalimageshouldbestretchedintoavectorfromtheimagedatabases.Then,throughprincipalcomponentanalysistoobtainatransformationmatrixandvectormeanofimages.Theimagecompressionisaprocessthatusingthecompresstheimagebysubtractingthemeanvectorofthetrainingimagesobtainedbyatransformationmatrixandconvertedintoaverysmalldimensionofavector.Thereconstructedimageisthatacompressedimagebytheinversetransformmatrixofthetransformationmatrixandthenaninversetransformobtainedwithameanvectoroftheimagebeforecompressionvectorapproximation.Then,thisarticleintroducedaseriesofimprovedalgorithmofprincipalcomponentanalysismethod,includingMatPCAalgorithm,2DPCAalgorithm,ModulePCAalgorithm.Theneachoneofthetrainingimagesaredividedintoanumberofssub-imagewhichisofthesamesize,andbringallthesub-imageofallthesetrainingimageforPCAanalysis.Afterthatwecangetthecorrespondingcovariancematrixoftheoverall.Whencompressingthetestimage,wealsoneeddividethetestimageintosub-imageaswedotothetrainingimage,andthencompressthesub-imageonebyone.Ifwewanttoreconstructtheimage,wehavetoreconstructthesub-imageonebyonefirst,whenthereconstructionofthesub-imageisover,piecingtogetherallthesub-imagefortheoriginalimage.TheresultoftheexperimentshowswecanreducethedimensionofthedatabyusingModulePCA,meanwhile,wecanalsouseModulePCAforimagecompressionandreconstructtheimageaccordingtoourdemands.Keywords:imagecompression,imagereconstruction,PCA,featureextraction西南科技大学本科生毕业论文III目录第1章绪论.......................................................11.1本文选题背景及意义..........................................11.2国内外研究现状..............................................21.3本文主要内容及章节安排......................................2第2章PCA算法理论基础............................................42.1引言........................................................42.2PCA算法理论概述............................................72.2.1K-L变换...............................................82.2.2SVD分解...............................................82.2.3特征向量的选取.......................................102.2.4PCA算法流程框图......................................112.3本章小结...................................................13第3章PCA改进算法理论基础........................................143.1引言.......................................................143.22DPCA算法理论概述.........................................143.2.12DPCA算法理论........................................153.2.2基于2DPCA的图像压缩.................................173.2.3基于2DPCA的图像重建.................................173.2.42DPCA的流程框图......................................183.3MatPCA算法理论概述.......................................193.3.1MatPCA简介..........................................193.3.2MatPCA算法..........................................203.3.3MatPCA算法流程......................................213.4ModulePCA算法概述........................................223.4.1ModulePCA算法简介...................................223.4.2ModulePCA算法.......................................223.4.3ModulePCA算法流程...................................233.5本章小结...................................................24第4章MATLAB程序实现............................................254.1概述.......................................................254.2PCA、2DPCA和MatPCA程序实现..............................254.2.1总体算法框架代码......................................25西南科技大学本科生毕业论文IV4.2.2训练图像..............................................264.2.3测试图像..............................................304.2.4添加噪声..............................................304.2.5压缩图像..............................................324.2.6图像重建..............................................334.3ModulePCA程序实现........................................354.3.1训练图像.............................................354.3.2测试图像.............................................374.3.3压缩图像.............................................384.3.4图像重建.............................................394.4本章小结...................................................39第5章实验结果及分析.............................................405.1概述.....................................................405.2PCA、2DPCA和MatPCA结果分析...........................405.2.1总体框架..............................................405.2.2PCA算法实验分析..