⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eigenfacereconstructdemo.m

📁 automatic face recognition
💻 M
字号:
% A small demo to create reconstructed facial imagesfunction EigenfaceReconstructDemo% training datafor i=1:5     It(:,:,i) = imread(sprintf('image/face%02d.gif', i));endXt = reshape(double(It), [], 5);Ct = [1 2 3 4 5];% test dataIq(:,:,1) = imread('image/face01.gif');Iq(:,:,2) = imread('image/face06.gif');Iq(:,:,3) = imread('image/occludedface06.gif');[nRow, nCol, N] = size(Iq);Xq = reshape(double(Iq), [], 3);% training[U, Me] = cvPca(Xt);% projection[Yq] = cvPcaProj(Xq, U, Me);% reconstruction[Zq] = cvPcaInvProj(Yq, U, Me);Rq = reshape(uint8(Zq), nRow, nCol, N);imwrite(Rq(:, :, 1), 're_face01.gif', 'GIF');imwrite(Rq(:, :, 2), 're_face06.gif', 'GIF');imwrite(Rq(:, :, 3), 're_occludedface06.gif', 'GIF');end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -