use_hlf.m
来自「关于人脸识别的一个VC程序」· M 代码 · 共 18 行
M
18 行
function out_image = use_hlf(im, filter, thresh)
% im - IxJ input image
% filter - WxHxN where wW and H are the width and height of the filters and N is the number of filters
% thresh - N vectors containing the thresholds
nb = size(filter,3);
out_image(1:size(im,1), 1:size(im,2), 1:nb) = NaN;
[out_image(:,:,1), patches] = filter2_ortho_first(filter(:,:,1), im);
out_image(:,:,1) = out_image(:,:,1) - thresh(1);
for i=2:nb
fprintf('pass %d, retaining %.2f pixels\n', i, sum(sum(out_image(:,:,i-1) > 0)));
[out_image(:,:,i), patches] = filter2_ortho(filter(:,:,i), patches, filter(:,:,i-1), (out_image(:,:,i-1) > 0));
out_image(:,:,i) = out_image(:,:,i) - thresh(i);
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?