Last change
on this file since 110 was
94,
checked in by (none), 14 years ago
|
PPPP - ica serial implementation
|
File size:
465 bytes
|
Rev | Line | |
---|
[94] | 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 (imgDir) |
---|
| 9 | r = dir; |
---|
| 10 | |
---|
| 11 | C = [] |
---|
| 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 | C = [C;tmp]; |
---|
| 18 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.