高分求matlab pca人脸识别程序
function pca (path, trainList, subDim)
%
% PROTOTYPE
% function pca (path, trainList, subDim)
%
% USAGE EXAMPLE(S)
% pca ('C:/FERET_Normalised/', trainList500Imgs, 200);
%
% GENERAL DESCRIPTION
% Implements the standard Turk-Pentland Eigenfaces method. As a final
% result, this function saves pcaProj matrix to the disk with all images
% projected onto the subDim-dimensional subspace found by PCA.
%
% REFERENCES
% M. Turk, A. Pentland, Eigenfaces for Recognition, Journal of Cognitive
% Neurosicence, Vol. 3, No. 1, 1991, pp. 71-86
%
% M.A. Turk, A.P. Pentland, Face Recognition Using Eigenfaces, Proceedings
% of the IEEE Conference on Computer Vision and Pattern Recognition,
% 3-6 June 1991, Maui, Hawaii, USA, pp. 586-591
%
%
% INPUTS:
% path - full path to the normalised images from FERET database
% trainList - list of images to be used for training. names should be
% without extension and .pgm will be added automatically
% subDim - Numer of dimensions to be retained (the desired subspace
% dimensionality). if this argument is ommited, maximum
% non-zero dimensions will be retained, i.e. (number of training images) - 1
%
% OUTPUTS:
% Function will generate and save to the disk the following outputs:
% DATA - matrix where each column is one image reshaped into a vector
% - this matrix size is (number of pixels) x (number of images), uint8
% imSpace - same as DATA but only images in the training set
% psi - mean face (of training images)
% zeroMeanSpace - mean face subtracted from each row in imSpace
% pcaEigVals - eigenvalues
% w - lower dimensional PCA subspace
% pcaProj - all images projected onto a subDim-dimensional space
%
% NOTES / COMMENTS
% * The following files must either be in the same path as this function
% or somewhere in Matlab's path:
% 1. listAll.mat - containing the list of all 3816 FERET images
%
% ** Each dimension of the resulting subspace is normalised to unit length
%
% *** Developed using Matlab 7
%
%
% REVISION HISTORY
% -
%
% RELATED FUNCTIONS (SEE ALSO)
% createDistMat, feret
%
% ABOUT
% Created: 03 Sep 2005
% Last Update: -
% Revision: 1.0
%
% AUTHOR: Kresimir Delac
% mailto: [email protected]
% URL: http://www.vcl.fer.hr/kdelac
%
% WHEN PUBLISHING A PAPER AS A RESULT OF RESEARCH CONDUCTED BY USING THIS CODE
% OR ANY PART OF IT, MAKE A REFERENCE TO THE FOLLOWING PAPER:
% Delac K., Grgic M., Grgic S., Independent Comparative Study of PCA, ICA, and LDA
% on the FERET Data Set, International Journal of Imaging Systems and Technology,
% Vol. 15, Issue 5, 2006, pp. 252-260
%
% If subDim is not given, n - 1 dimensions are
% retained, where n is the number of training images
if nargin < 3
subDim = dim - 1;
end;
disp(' ')
load listAll;
% Constants
numIm = 3816;
% Memory allocation for DATA matrix
fprintf('Creating DATA matrix\n')
tmp = imread ( [path char(listAll(1)) '.pgm'] );
[m, n] = size (tmp); % image size - used later also!!!
DATA = uint8 (zeros(m*n, numIm)); % Memory allocated
clear str tmp;
% Creating DATA matrix
for i = 1 : numIm
im = imread ( [path char(listAll(i)) '.pgm'] );
DATA(:, i) = reshape (im, m*n, 1);
end;
save DATA DATA;
clear im;
% Creating training images space
fprintf('Creating training images space\n')
dim = length (trainList);
imSpace = zeros (m*n, dim);
for i = 1 : dim
index = strmatch (trainList(i), listAll);
imSpace(:, i) = DATA(:, index);
end;
save imSpace imSpace;
clear DATA;
% Calculating mean face from training images
fprintf('Zero mean\n')
psi = mean(double(imSpace'))';
save psi psi;
% Zero mean
zeroMeanSpace = zeros(size(imSpace));
for i = 1 : dim
zeroMeanSpace(:, i) = double(imSpace(:, i)) - psi;
end;
save zeroMeanSpace zeroMeanSpace;
clear imSpace;
% PCA
fprintf('PCA\n')
L = zeroMeanSpace' * zeroMeanSpace; % Turk-Pentland trick (part 1)
[eigVecs, eigVals] = eig(L);
diagonal = diag(eigVals);
[diagonal, index] = sort(diagonal);
index = flipud(index);
pcaEigVals = zeros(size(eigVals));
for i = 1 : size(eigVals, 1)
pcaEigVals(i, i) = eigVals(index(i), index(i));
pcaEigVecs(:, i) = eigVecs(:, index(i));
end;
pcaEigVals = diag(pcaEigVals);
pcaEigVals = pcaEigVals / (dim-1);
pcaEigVals = pcaEigVals(1 : subDim); % Retaining only the largest subDim ones
pcaEigVecs = zeroMeanSpace * pcaEigVecs; % Turk-Pentland trick (part 2)
save pcaEigVals pcaEigVals;
% Normalisation to unit length
fprintf('Normalising\n')
for i = 1 : dim
pcaEigVecs(:, i) = pcaEigVecs(:, i) / norm(pcaEigVecs(:, i));
end;
% Dimensionality reduction.
fprintf('Creating lower dimensional subspace\n')
w = pcaEigVecs(:, 1:subDim);
save w w;
clear w;
% Subtract mean face from all images
load DATA;
load psi;
zeroMeanDATA = zeros(size(DATA));
for i = 1 : size(DATA, 2)
zeroMeanDATA(:, i) = double(DATA(:, i)) - psi;
end;
clear psi;
clear DATA;
% Project all images onto a new lower dimensional subspace (w)
fprintf('Projecting all images onto a new lower dimensional subspace\n')
load w;
pcaProj = w' * zeroMeanDATA;
clear w;
clear zeroMeanDATA;
save pcaProj pcaProj;
matlab人脸检测程序怎么用
1边缘值为零才能更好的识别人脸的轮廓
2识别原理很简单,就是你事先照完相,你的相片已经储存在里面了,你的脸经过和相片对比,然后系统就做出识别,对比脸部特征一样就合格了!程序就批准,你的识别确认就成功了。就是这样的原理
3因为只有这样的分辨率才是最佳的,只有在这种比值下,系统才能更好的运作起来,才能达到最好的效果
希望这个答案你满意!
德州仪器的新出的TI-Nspire? CX和TI-Nspire? CX CAS区别...
TI-Nspire 及TI-Nspire CAS 的售价相差很小,纯以功能而言,TI-Nspire CAS 比 TI-Nspire 是好得多的,就像TI-89 Titanium 和TI-84 Plus 的关系一样,TI-Nspire CAS比TI-Nspire多代数功能,TI-Nspire CAS 另外还有解方程及微分方程 ( Differential Equations )、极限 ( Limits )、泰勒展开式 ( Taylor's Expansion ) 等功能。还有CAS用起来比Nspire要顺手,比较人性化,容易学,我个人推荐买CAS
求冲压方面的英语达人帮忙翻译一下,急!谢谢了!
The main positioning reference design of the stamping and welding parts of BIW (body in white)
Abstract
This paper describes the design of the main positioning reference of the BIW stamping and welding parts, which must follow the positioning guidelines and some other requirements relevant to positioning reference. This paper also explains how to use GD&T information in engineering drawings to accurately reflect the corresponding positioning reference information.
Keywords: The BIW stamping and welding parts, the main positioning reference, GD&T information
求英语达人帮忙翻译下~~~~谢谢
In the contemporary era, the world economy is becoming a truly global village economy. Regardless of whether cross-border business operations, will be subject to external influence and impact of cross-cultural enterprises must master the conditions for the operation and management methods and techniques. This requires defining the cross-cultural business management concept and content of cross-cultural analysis of the conditions for enterprise management, to explore the establishment of an effective cross-cultural management of the general steps and methods.
Key words: globalization, regional culture, cross-cultural management strategies, cross-cultural training
希望您能满意
TI-Nspire CX的技术参数
显示屏尺寸:320 x 240像素(3.2寸);显示屏分辨率:125 DPI 16位彩色 初始系统:版本3.0电池:TI-Nspire充电电池(内置);内存:100 MB储存内存 / 64MB操作内存;USB接口:用于连接电脑,以及TI-Nspire图形计算器之间的连接等。尺寸:19.05*8.69*1.57(cm)/7.50*3.42*0.62(inch)(长*宽*厚) 包装中有以下物品:TI-Nspire CX (CAS) 图形计算器;TI-Nspire充电电池;USB连接线;图形计算器连接线。(教师扩展包中包含TI-Nspire CX 扩充座)