1,提取特征脸:
YaleB:(AR同)
img:192*168
随机矩阵:
randmatrix = rand(504,192*168)
l2norm = sqrt(sum(randmatrix.*randmtrix,2)+eps) %每一行相加:504*1
randmatrix = randmatrix./repmat(l2norm,1,size(randmatrix,2)) %504*32256/(504*1,扩充到32256列)
img = imread('img1071.jpg')
feature = double(img(:))
randomfacefeature = randmatrix*feature %504×32256*32256×1 = 504*1
一张图片按列优先,组成32256*1,
随机矩阵大小:504*32256
得到特征脸504*1
此数据集包括38个人,一个人大概64张图片(部分59,60,62)
包括三个变量:
labelMat:38*2414(38类,2414张图片)
filenamemat:1*38个元组,每一个元组是1*64
featureMat:504*2414