资源简介
光照预处理是人脸识中种有效的处理光照变化的方法。近年来涌现出一系列人脸光照预处理方法,但针对这些方法的系统对比与分析的工作相对较少,本文在系统比较现有方法的基础上提出了人脸光照预处理方法的新见解和结论,以及如何设计更好的预处理方法。我们对12种具有代表性的光照预处理方法进行比较研究(HE,LT,GIC,DGD,LOG,SSR,GHP,SQI,LDCT,LTV,LN和TT),着重于两个
新的角度:(1)全局方法的局部化和(2)大尺度和小尺度特征带的融合。在公开的人脸数据库(Yalebext,CMU-PIE,CAS-PEAL和FRGC v2.0)上的实验表明,对全局的光照处理方法(HE,GIC,LTV和TT)进行局部化进一步提高了性能。对(SSR,GHP,SQI,LDCT,LTV和TT)等方法进行大尺度和小尺度的融合有助于光照不变的人脸识别。
来源:http://valser.org/forum.php?mod=viewthread&tid=1051&page=1&extra=#pid1254
代码片段和文件信息
function img_out = DCTN(img_in Cov2LOG blkPattern numY_pat numX_pat cordY_pat cordX_pat sizeY_pat sizeX_pat)
% face illumination preprocessing using LDCT method
% DCTN: Discrete cosine transforms normalization
% Basic principle: Reflectance field estimation
% References: W.Chen M.J.Er S.Wu Illumination compensation and normalization for
% robust face recognition using discrete cosine transform in logarithm domain
% IEEE Transactions on Systems Man and Cybernetics PartB: Cybernetics 36 (2006) 458–466.
%
% INPUT:
% img_in: the input image
% Cov2LOG: whether use logarithmic operation (true or false)
% blkPattern:
% 0: holistic approach
% 1: localization for holistic approach
% numY_pat: number of patches in Y direction
% numX_pat: number of patches in X direction
% cordY_pat: left most coordinate of every patch
% cordX_pat: top most coordinate of every patch
% sizeY_pat: number of columns in a patch width
% sizeX_pat: number of rows in a patch height
%
% OUTPUT:
% img_out: the LDCT image
[row col] = size(img_in);
if blkPattern == 0
if Cov2LOG
log_img = double(img_in);
log_img = log(log_img + 1);
C = dct2(log_img);
mu = mean(mean(log_img));
Ddis = 15;
%Ddis = 22 * sqrt( double(row * row + col * col) ) / sqrt(120.0 * 120.0 + 105.0 * 105.0);
else
C = dct2(double(img_in));
mu = mean(mean(img_in));
Ddis = 22 * sqrt( double(row * row + col * col) ) / sqrt(120.0 * 120.0 + 105.0 * 105.0);
end
for i = 1 : row
for j = 1 : col
if (i + j) <= (Ddis + 1)
C(i j) = 0;
end
end
end
C(1 1) = log(mu) * sqrt(row * col);
img_rst = idct2(C);
img_rst = mat2gray(img_rst) * 255.0;
img_out = uint8(img_rst);
else
res_img = zeros(row col);
counter = zeros(row col);
inx = 0;
for i = 1 : numY_pat
for j = 1 : numX_pat
inx = inx + 1;
y1 = cordY_pat(inx);
x1 = cordX_pat(inx);
y2 = cordY_pat(inx) + sizeY_pat(inx) - 1;
x2 = cordX_pat(inx) + sizeX_pat(inx) - 1;
% input pat
in_pat = in_cha(y1: y2 x1 : x2);
[pat_row pat_col] = size(in_pat);
%pat_mu = mean( reshpae(in_pat pat_row * pat_col 1) );
pat_mu = mean(mean(in_pat));
Ddis = 22 * sqrt(pat_row * pat_row + pat_col * pat_col) / sqrt(120.0 * 120.0 + 105.0 * 105.0);
C = dct2(in_pat);
for k = 1 : row
for l = 1 : col
if (k + l) <= (Ddis + 1)
C(k l) = 0;
end
end
end
C(1 1) = log(pat_mu) * sqrt(pat_row * pat_col);
res_pat = idct2(C);
r
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-08-11 15:24 IlluminationPreprocessing_release_v1.0\
文件 3300 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\DCTN.m
文件 595 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\DX.m
文件 595 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\DY.m
文件 828 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\GHP.m
文件 4916 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\GIC.m
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\GIC_Canonical_PIEIllum_64x80.bmp
文件 4470 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\GIC_Canonical_PIEIllum_64x80.mat
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\GIC_Canonical_YaleBExt_64x80.bmp
文件 4880 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\GIC_Canonical_YaleBExt_64x80.mat
文件 2432 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\HE.m
文件 7330 2016-08-11 15:22 IlluminationPreprocessing_release_v1.0\IlluminationNormalization4OneImg.m
目录 0 2016-08-11 15:20 IlluminationPreprocessing_release_v1.0\ImagesForDebug\
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00001_P00A+000E+00.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00001_P00A-005E-10.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00001_P00A-005E-10_GIC.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00001_P00A-010E-20.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00001_P00A-035E-20.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00001_P00A-035E-20_GIC.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00001_P00A-050E+00.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00001_P00A-070E+00.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00001_P00A-095E+00.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00001_P00A-095E+00_GIC.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00002_P00A-060E-20.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00003_P00A+000E+00.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00003_P00A+020E+10.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00006_P00A-020E+10.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00007_P00A+000E+00.bmp
文件 6198 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\00039_P00A-110E-20.bmp
文件 14038 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\000_105x120.bmp
文件 14038 2016-08-11 14:30 IlluminationPreprocessing_release_v1.0\ImagesForDebug\001_105x120.bmp
............此处省略75个文件信息
评论
共有 条评论