资源简介
适合做人脸识别的朋友,其中有特征提取,创建字典,分类识别,是完整的一套SRC算法,和SRC那篇论文相匹配。
代码片段和文件信息
% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TS_Vector = dir(‘C:\Documents and Settings\Administrator\桌面\SRC\train‘);
No_Folders_In_Training_Set_Folder=length(TS_Vector);
Class_Count = 1;
Dic_Count=1;
for k = 3:No_Folders_In_Training_Set_Folder
Class_Folder = [‘C:\Documents and Settings\Administrator\桌面\SRC\train\‘ TS_Vector(k).name‘\‘];
CF_Tensor = dir(Class_Folder);
flag=0;
for p = 3:length(CF_Tensor)
Tmp_Image_Path = Class_Folder;
Tmp_Image_Name = CF_Tensor(p).name;
if strcmp(Tmp_Image_Name‘Thumbs.db‘)
flag=1;
continue;
end
Tmp_Image_Path_Name = [Tmp_Image_PathTmp_Image_Name];
img=imread(Tmp_Image_Path_Name);
% imshow(img);
% pause(0.2);
[rowline]=size(img);
img_new=img(1:10:row1:10:line:);
[row2line2]=size(img_new);
Dic(:Dic_Count)=img_new(:);
Dic_Count=Dic_Count+1;
end
if flag==0
No_Files_In_Class_Folder(Class_Count)=length(CF_Tensor)-2
else
No_Files_In_Class_Folder(Class_Count)=length(CF_Tensor)-3
end
Class_Count=Class_Count+1;
end
Class_Count=Class_Count-1;
Dic_Count= Dic_Count-1;
Dic=double(Dic);
Dic=Dic/(diag(sqrt(diag(Dic‘*Dic)))); %字典
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%稀疏编码
correct_num=0;wrong_num=0;
e=0.05;
TS_Vector2 = dir(‘C:\Documents and Settings\Administrator\桌面\SRC\test‘);
No_Folders_In_Test_Set_Folder = length(TS_Vector2);
for k = 1: No_Folders_In_Test_Set_Folder-2
class=k;
Class_Folder = [‘C:\Documents and Settings\Administrator\桌面\SRC\test\‘ TS_Vector2(k+2).name‘\‘];
CF_Tensor= dir(Class_Folder);
num=0;
for p = 3:length(CF_Tensor)
Tmp_Image_Path = Class_Folder;
Tmp_Image_Name = CF_Tensor(p).name;
if strcmp(Tmp_Image_Name‘Thumbs.db‘)
continue
end
Tmp_Image_Path_Name = [Tmp_Image_PathTmp_Image_Name];
num=num+1;
img=imread(Tmp_Image_Path_Name);
% imshow(img);
% pause(0.2);
% [rowline]=size(img);
img_new=img(1:10:row1:10:line:);
img_new=double(img_new(:));
r=img_new; %残差
% D=[]; %空字典
% coeff=[]; %去0系数
% pos_arr=[]; %位置
% coeff2=zeros(Dic_Count1);%完整系数
% Dic2=Dic;
% disp([‘正在测试第‘num2str(k)‘类的第‘num2str(num)‘个样本!‘]);
% while sqrt(sum(r.^2))>0.005
% for col=1:Dic_Count
% product(col)=abs(Dic2(:col)‘*r);
% end
% [val pos]=max(product);
% D=[DDic2(:pos)];
% Dic2(:pos)=zeros(length(img_new)1);
% coeff=(D‘*D)^(-1)*D‘*img_new;
% r=img_new-D*coeff;
% pos_arr=[pos_arr;pos];
% end
% coeff2(pos_arr)=coeff;
reconst=zeros
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 10318 2008-09-25 09:34 SRC\03.pgm
文件 5239 2012-09-29 09:56 SRC\experi.asv
文件 5211 2012-09-29 15:53 SRC\experi.m
文件 4155 2012-09-27 15:40 SRC\face.asv
文件 4130 2012-09-27 15:58 SRC\face.m
文件 4663 2012-09-27 15:27 SRC\face2.asv
文件 4658 2012-09-27 15:55 SRC\face2.m
文件 3227703 2011-09-01 14:02 SRC\FDDL\AR_EigenFace.mat
文件 1620 2012-09-20 09:55 SRC\FDDL\demo.asv
文件 1632 2012-09-20 10:36 SRC\FDDL\demo.m
文件 2048 2011-09-02 09:54 SRC\FDDL\Readme.txt
文件 1521 2006-12-19 06:13 SRC\FDDL\utilies\Eigenface_f.m
文件 6636 2011-09-01 14:54 SRC\FDDL\utilies\FDDL.m
文件 2427 2011-08-31 23:48 SRC\FDDL\utilies\FDDL_Class_Energy.m
文件 2100 2011-09-01 15:03 SRC\FDDL\utilies\FDDL_FDL_Energy.m
文件 2975 2011-08-31 23:57 SRC\FDDL\utilies\FDDL_Gradient_Comp.m
文件 7852 2011-09-01 15:05 SRC\FDDL\utilies\FDDL_INIC.m
文件 1126 2011-08-31 22:25 SRC\FDDL\utilies\FDDL_INID.m
文件 9189 2011-09-01 15:05 SRC\FDDL\utilies\FDDL_SpaCoef.m
文件 3470 2011-09-01 00:13 SRC\FDDL\utilies\FDDL_UpdateDi.m
文件 6226 2011-09-01 21:32 SRC\FDDL\utilies\IPM_SC.m
文件 119 2009-09-24 21:20 SRC\FDDL\utilies\soft.m
文件 3245884 2012-08-19 10:11 SRC\FDDL.zip
文件 10318 2008-09-25 09:34 SRC\save test\s01\01.pgm
文件 10318 2008-09-25 09:34 SRC\save test\s01\02.pgm
文件 10318 2008-09-25 09:34 SRC\save test\s01\03.pgm
文件 10318 2008-09-25 09:34 SRC\save test\s01\04.pgm
文件 10318 2008-09-25 09:34 SRC\save test\s01\05.pgm
文件 10318 2008-09-25 09:34 SRC\save test\s02\01.pgm
文件 10318 2008-09-25 09:34 SRC\save test\s02\02.pgm
............此处省略1193个文件信息
相关资源
- apache axis 1.4 src官方已经找不到了
- jforum-2.1.8-src.zip
- Abakus v9.10Build9 for Rio_NoSrc.zip
- qwt-6.1.3pdf+qch+src
- TeeChart Pro VCL FMX 2020.29 src.zip
- doudizhu_shffule_src.zip
- UniDac 6.2.8 src for Delphi 10.1 柏林版
- 学习笔记之——基于pytorch的FSRCNN
- SN_Writer_Tool_src_v1.2020.0.0.rar
- ErlangOTP 21.3.zip
- SB-WinSrc.zip
- SRCNN代码解析_train.pdf
- otp_src_21.2.tar.gz
- otp_src_19.1.tar.gz
- apache-jmeter-3.0.zip和apache-jmeter-3.0_src.
- srcnn.rar
- JpcapDumper-0.3-src
- gh0st3.6_src红狼官方_源码
- apache-camel-1.2.0-src.tar.gz
- jpegsrc.v8d.tar.gz
- 整理好的DWR-2.0.5-src
- jpegsrc.v9b.tar.gz
- yaffs2-src-20100329.tar.gz
- grbl-0.8_src
- qt-everywhere-opensource-src-5.6.0.tar.gz
- stockfish-10-src.zip
- USB设备过滤驱动[Src+Bin]
- qt-everywhere-opensource-src-5.7.0
- srchasst.inf安装需要文件
- mfi iap2 src
评论
共有 条评论