source: proiecte/PPPP/ica/loadFs.m @ 138

Last change on this file since 138 was 138, checked in by (none), 14 years ago

PPPP - ica

File size: 497 bytes
Line 
1%function C = loadFaceMat(imgdir);
2%
3%Loads a directory of images into the rows of C.
4%imgdir is a string with the path to the directory containing the images.
5%For example:
6%imgdir = 'C:\Documents and Settings\Marian Bartlett\My Documents\TestDir\AlignedFaceImages\'
7
8function C = loadFs(imgDir);
9
10cd (imgDir)
11r = dir;
12
13C = [];
14for i = 3:(size(r,1))
15   t = r(i).name;
16        I=imread(t);
17      tmp=mat2gray(double(I));
18      tmp = reshape(tmp,1,size(tmp,1)*size(tmp,2));
19      C = [C;tmp];
20end
21
Note: See TracBrowser for help on using the repository browser.