资源简介
指纹识别相关代码,很好的实现了指纹特征提取,指纹匹配
代码片段和文件信息
function [OutputprintXofCenterYofCenter] = centralizing(fingerprintctrl)
% modified by PRTsinghua@hotmail.com
imgN=size(fingerprint1);
imgM=size(fingerprint2);
image = wiener2(fingerprint[3 3]);
[GxGy] = gradient(image);
orientnum = wiener2(2.*Gx.*Gy[3 3]);
orientden = wiener2((Gx.^2) - (Gy.^2)[3 3]);
W = 8;
ll = 9;
orient = zeros(imgN/WimgM/W);
%-----------------------------------------------
points=(imgN/W)*(imgM/W);
for i = 1:1:points
x = floor((i-1)/(imgM/W))*W+1;
y = mod(i-1(imgN/W))*W+1;
numblock = orientnum(y:y+W-1x:x+W-1);
denblock = orientden(y:y+W-1x:x+W-1);
somma_num=sum(sum(numblock));
somma_denom=sum(sum(denblock));
if somma_denom ~= 0
inside = somma_num/somma_denom;
angle = 0.5*atan(inside);
else
angle = pi/2;
end
% each block
if angle < 0
if somma_num < 0
angle = angle + pi/2;
else
angle = angle + pi;
end
else
if somma_num > 0
angle = angle + pi/2;
end
end
orient(1+(y-1)/W1+(x-1)/W) = angle;
end
binarize = (orient < pi/2);
[bibj] = find(binarize);
xdir = zeros(WW);
ydir = zeros(WW);
for k = 1:1:size(bj1)
i = bj(k);
j = bi(k);
if orient(ji) < pi/2
x = fix(ll*cos(orient(ji)-pi/2)/(W/2));
y = fix(ll*sin(orient(ji)-pi/2)/(W/2));
xdir(ji) = i-x;
ydir(ji) = j-y;
end
end
binarize2 = zeros(imgN/WimgM/W);
for i = 1:1:size(bj1)
x = bj(i);
y = bi(i);
if ~(xdir(yx) < 1 | ydir(yx) < 1 | xdir(yx) > imgM/W | ydir(yx) > imgN/W)
while binarize(ydir(yx)xdir(yx)) > 0
xtemp = xdir(yx);
ytemp = ydir(yx);
if xtemp < 1 | ytemp < 1 | xtemp > imgM/W | ytemp > imgN/W
break;
end
x = xtemp;
y = ytemp;
if xdir(yx) < 1 | ydir(yx) < 1 | xdir(yx) > imgM/W | ydir(yx) > imgN/W
if x-1 > 0
while binarize(yx-1) > 0
x = x-1;
if x-1 < 1
break;
end
end
end
break;
end
end
end
binarize2(yx) = binarize2(yx)+1;
end
[tempy] = max(binarize2(1:end-7:));
[temp2x] = max(temp);
angle = orient(y(x)x)-pi/2;
XofCenter=round(x*W-(W/2)-(ll/2)*cos(angle));
YofCenter=round(y(x)*W-(W/2)-(ll/2)*sin(angle));
Outputprint=binarize2;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 11715 2009-09-20 13:02 2matlab sourcecode for 指纹\1.jpg
文件 11667 2009-09-20 13:06 2matlab sourcecode for 指纹\2.jpg
文件 11373 2009-09-20 13:05 2matlab sourcecode for 指纹\3.jpg
文件 9617 2009-09-20 13:05 2matlab sourcecode for 指纹\4.jpg
文件 8443 2009-09-20 13:05 2matlab sourcecode for 指纹\5.jpg
文件 9426 2009-09-20 13:05 2matlab sourcecode for 指纹\6.jpg
文件 11100 2009-09-20 13:04 2matlab sourcecode for 指纹\7.jpg
文件 11801 2009-09-20 13:06 2matlab sourcecode for 指纹\8.jpg
文件 66614 2001-01-11 11:56 2matlab sourcecode for 指纹\19_7.bmp
文件 132118 2000-08-21 00:28 2matlab sourcecode for 指纹\22443.bmp
文件 66614 2001-01-11 11:56 2matlab sourcecode for 指纹\37_3.bmp
文件 66614 2001-01-11 11:56 2matlab sourcecode for 指纹\37_5_2.bmp
文件 66614 2001-01-11 11:56 2matlab sourcecode for 指纹\37_7.bmp
文件 31878 2009-10-02 21:28 2matlab sourcecode for 指纹\n5.bmp
文件 81 2004-06-30 00:52 2matlab sourcecode for 指纹\readme.txt
..A.SH. 35840 2007-08-22 09:45 2matlab sourcecode for 指纹\Thumbs.db
文件 30121 2009-10-02 20:54 2matlab sourcecode for 指纹\fpextractdemo.asv
文件 610 2009-10-02 16:07 2matlab sourcecode for 指纹\gabor2d_sub.asv
文件 49673 2010-04-07 15:14 2matlab sourcecode for 指纹\informations.dat
文件 2627 2004-03-05 03:41 2matlab sourcecode for 指纹\centralizing.m
文件 1489 2004-03-05 05:10 2matlab sourcecode for 指纹\Cropping.m
文件 30135 2009-10-02 21:22 2matlab sourcecode for 指纹\fpextractdemo.m
文件 675 2009-10-02 21:29 2matlab sourcecode for 指纹\gabor2d_sub.m
文件 1717 2004-03-05 05:13 2matlab sourcecode for 指纹\sector_norm.m
文件 572 2004-03-05 05:12 2matlab sourcecode for 指纹\vedicentro.m
文件 929 2004-03-05 05:14 2matlab sourcecode for 指纹\whichsector.m
目录 0 2010-04-07 15:12 2matlab sourcecode for 指纹
----------- --------- ---------- ----- ----
670063 27
............此处省略0个文件信息
评论
共有 条评论