Last change
on this file since 110 was
94,
checked in by (none), 14 years ago
|
PPPP - ica serial implementation
|
File size:
530 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 |
|
---|
8 | cd ('C:\Users\Andrei\Desktop\yalefaces\test\')
|
---|
9 | r = dir;
|
---|
10 |
|
---|
11 | Ctest = []
|
---|
12 | for 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 | Ctest = [Ctest;tmp];
|
---|
18 | end
|
---|
Note: See
TracBrowser
for help on using the repository browser.