source: proiecte/PPPP/ica/loadFaceMat.m @ 94

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

PPPP - ica serial implementation

File size: 465 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
8cd (imgDir)
9r = dir;
10
11C = []
12for i = 3:(size(r,1))
13   t = r(i).name;
14        I=imread(t);
15      tmp=mat2gray(double(I));
16      tmp = reshape(tmp,1,size(tmp,1)*size(tmp,2));
17      C = [C;tmp];
18end
Note: See TracBrowser for help on using the repository browser.