الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

How do we recognize a face

بدأه Hessa في 10 مارس 2014 · 0 رد · 919 مشاهدة · في الذكاء الاصطناعي وتطبيقاته
مشاركة: واتساب X فيسبوك تيليجرام
#1

Hi,,I want to use PAC in face recognition in matlab


I wrote a command for PCA but  stucked with writing a code to recover the image from EigenFace


 


could you please tell me the steps which I need?


 


this is which I have done so far


 


 


load('att.mat');


[n,d] = size(Data);


% calculate the mean


M=mean(Data);                         % the maxumum value of the mean is 8.9269exp(-09) which means the mean is very close to zero


MM = repmat(M,n,1);


% center the data


x1 = Data-MM;


 


%compute the covariance matrix 


C = cov(x1);


% Compute SVD (equivalently eigen-decomposition) of the convariance matrix


[V, E] = svd©;  %V is the eigenvector,E the eigenvalue


 


plot(E,'ro')


 


 V1 = V(:,1:2);   %choose the first 2 column


 


 %transformation Vk? maps a generic data point in R33 to a lower dimensional space R4


 


 y1 = V1'*x1';    %project the data onto the the four components


 

and I have no problem with this code,,my problem is in the following one

 

% calculate the similarity of the input to each training image


Recon-image =V*( V1' * (Data(:,1)-M))+M;


similarity_score = arrayfun(@(n) 1 / (1 + norm(y1(:,n) - Recon-image)), 1:d);


 


% find the image with the highest similarity


[match_score, match_ix] = max(similarity_score);


 

I cannot continue because some mistake but cannot discover it

 

Thank you

 


−1

مواضيع مشابهة