资源简介
我最近做的一项工作,用小波提取掌纹手背纹理,效果还不错,有代码和报告,给大家分享,相信不回让你失望
代码片段和文件信息
function f = adpmedian(g Smax)
%ADPMEDIAN Perform adaptive median filtering.
% F = ADPMEDIAN(G SMAX) performs adaptive median filtering of
% image G. The median filter starts at size 3-by-3 and iterates up
% to size SMAX-by-SMAX. SMAX must be an odd integer greater than 1.
% Copyright 2002-2004 R. C. Gonzalez R. E. Woods & S. L. Eddins
% Digital Image Processing Using MATLAB Prentice-Hall 2004
% $Revision: 1.5 $ $Date: 2003/11/21 14:19:05 $
% SMAX must be an odd positive integer greater than 1.
if (Smax <= 1) | (Smax/2 == round(Smax/2)) | (Smax ~= round(Smax))
error(‘SMAX must be an odd integer > 1.‘)
end
[M N] = size(g);
% Initial setup.
f = g;
f(:) = 0;
alreadyProcessed = false(size(g));
% Begin filtering.
for k = 3:2:Smax
zmin = ordfilt2(g 1 ones(k k) ‘symmetric‘);
zmax = ordfilt2(g k * k ones(k k) ‘symmetric‘);
zmed = medfilt2(g [k k] ‘symmetric‘);
processUsingLevelB = (zmed > zmin) & (zmax > zmed) & ...
~alreadyProcessed;
zB = (g > zmin) & (zmax > g);
outputZxy = processUsingLevelB & zB;
outputZmed = processUsingLevelB & ~zB;
f(outputZxy) = g(outputZxy);
f(outputZmed) = zmed(outputZmed);
alreadyProcessed = alreadyProcessed | processUsingLevelB;
if all(alreadyProcessed(:))
break;
end
end
% Output zmed for any remaining unprocessed pixels. Note that this
% zmed was computed using a window of size Smax-by-Smax which is
% the final value of k in the loop.
f(~alreadyProcessed) = zmed(~alreadyProcessed);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1419 2010-05-06 09:36 palm_1.m
文件 1351 2010-04-21 21:41 spfilt.m
文件 20349 2006-11-08 15:47 phasesym.m
文件 1572 2010-05-03 20:17 adpmedian.m
文件 250368 2010-05-28 23:50 DIP_homework2.doc
文件 209 2010-04-21 21:41 gmean.m
文件 12753 2010-05-03 10:51 Hand.jpg
文件 1535 2010-05-04 16:28 hand_1.m
文件 1578 2010-05-03 10:50 palm.jpg
----------- --------- ---------- ----- ----
291134 9
- 上一篇:御剑WEB指纹识别程序正式版
- 下一篇:首页登录素材
评论
共有 条评论