matlab principal component analysis ( PCA)

Share on :

image processing matlab

principal component analysis

Characteristic extraction aims to obtain vital information from facial features . The information is taken in the form of data representative of a raw data is represented using principal component analysis method . PCA is used to mengektraksi characteristics of the normalized image . PCA process will produce eigenvectors or characteristic vectors are then used to form the eigenspace ( eigenfaces ) . The steps in the formation of the eigenspace vectors forming faces , and quest weight of the vector eigen faces.
  • Formation vector face
Face image which is a two- dimensional image can be viewed as a one dimensional vector . If the length and width of the image is M and N pixels , the number of vector components is MXN . Each pixel is encoded by a vector component . Formation vector of an image is done by placing each line of the image in addition to the other line called lexicographical ordering .


  • Face Vector Image Formation of Faces
Results of the vector is then used as a column vector . Ie by multiplying the number of face vectors are then obtained vector column face . If the face amount is the vector W is the face ( MXN ) x W.
  listing program.
tic
load hasil\dbdata data
% Principal Component Analysis
[vec col]=size(data);
%mencari nilai tengah
mn=mean(data);
for i=1:vec
    xmean(i,:)=data(i,:)-mn;
end
%menghitung matrix covarians
kovar=xmean*xmean';
%mendapatkan eigen vektor dan eigen value
[v d]=eig(kovar);
%membentuk diagonal matrix sebagai vektor
d1=diag(d);
[d2 index]=sort(d1);
cols=size(v,2);for i=1:cols
    vsort(:,i)=v(:,index(cols-i+1));
    dsort(i)=d1(index(cols-i+1));
end
dsum=sum(dsort);
dsum_extract=0;
p=50;

i=1;
%mengambil 50 vektor eigenfaces
while(i<=p && dsort(i)>0)
    base(:,i)=dsort(i)^(-1/2)*xmean'*vsort(:,i);
    i=i+1;
end
PCA=data*base;
accu=0;
save hasil\dbeig PCA base

tag :

  • pcaprincipal componenet analysi
  • pca
  • image procesing
  • matlab code
  • face recognition
  • image recognition
  • feature ektraction

 

1 komentar:

vannaughdahlgren said... 4 March 2022 at 10:55

Las Vegas Casino & Hotel | MapYRO
Las Vegas Hotel and 청주 출장샵 Casino. The 전라남도 출장마사지 only Vegas-style casino resort on 포천 출장안마 the 진주 출장안마 Las Vegas Strip with more 양주 출장마사지 than 3,500 rooms and suites, three award-winning restaurants

Post a Comment and Don't Spam!

About

Powered by Blogger.

Search

 

Labels