getdata.m in pca_ann.rar


face recognition using pca and ann wih training and testing and validation priv...Original Link
    Sponsored links

			
function [data , targets , arity] = getdata(dir,to,po_emo_flag)
%------------------------------------------------------------
% [data , targets , arity] = getdata(dir,to,po_emo_flag)
%
%
% Returns data(images) in column-wise form accompanied by the
% corresponding target values.
% ->arity = number of columns in data(substantially: how many images)
% ->dir = directory
% ->to = a 1x2 vector that defines the maximum and minimum target values
% In order to have faster convergence when sigmoid function is used
% we prefer 0.9 or less instead of 1 in target values and 0.1 or
% more instead of 0.
% ->po_emo_flag = the kind of classification (0=pose, 1=emotion)
%
% Algorithm:
% Create data matrix with an image per column and based on the
% name of each image filename create the corresponding matrix
% with a target per column. Also return #of images as it might be useful
%
% ------------------/* Avraam Kasapis 2003 *\------------------
filenames = filevector(dir);
jlen = length(filenames);
%Read the size of the first image
[x y]= size(imread(filenames{1}));
data = zeros(x*y,jlen);
for i = 1:jlen
temp = imread(fil			

			...
			...
			... to be continued.

  This is a preview. To get the complete source file, 
  please click here to download the whole source code package.

			
			


Project Files

    Sponsored links
NameSizeDate
 accuracy.m2.80 kB07-02-09 23:50
 enc.m3.05 kB07-02-09 23:49
 filevector.m1.27 kB06-02-09 13:29
 getdata.m2.24 kB06-02-09 16:37
 prepcaCOV.m1.48 kB07-02-09 23:48
 readpgm.m908.00 B10-02-09 10:39
 redata.m3.11 kB07-02-09 23:35
 scale.m654.00 B07-02-09 23:48
 scripto.m4.39 kB08-02-09 00:02
 visnet.m1.86 kB07-02-09 23:51
 writepgm.m797.00 B06-02-09 15:10
 <nn>0.00 B04-04-09 22:03
...

Related Items

    Sponsored links