资源简介
这里是一些关于虹膜定位和特征提取的代码,感觉好不错,比较齐全,每一个基本上都有。
代码片段和文件信息
% gethammingdistance - returns the Hamming Distance between two iris templates
% incorporates noise masks so noise bits are not used for
% calculating the HD
%
% Usage:
% [template mask] = createiristemplate(eyeimage_filename)
%
% Arguments:
% template1 - first template
% mask1 - corresponding noise mask
% template2 - second template
% mask2 - corresponding noise mask
% scales - the number of filters used to encode the templates
% needed for shifting.
%
% Output:
% hd - the Hamming distance as a ratio
%
% Author:
% Libor Masek
% masekl01@csse.uwa.edu.au
% School of Computer Science & Software Engineering
% The University of Western Australia
% November 2003
function hd = gethammingdistance(template1 mask1 template2 mask2 scales)
clc;clear all
scales=1;
template1=imread(‘d:/image/eye.template.jpg‘);
mask1=imread(‘d:/image/eye.mask.jpg‘);
template2=imread(‘d:/010_1_1/010_1_1.template.bmp‘);
mask2=imread(‘d:/010_1_1/010_1_1.mask.bmp‘);
template1 = logical(template1);
mask1 = logical(mask1);
template2 = logical(template2);
mask2 = logical(mask2);
hd = NaN;
% shift template left and right use the lowest Hamming distance
for shifts=-8:8
template1s = shiftbits(template1 shiftsscales);
mask1s = shiftbits(mask1 shiftsscales);
mask = mask1s | mask2;
nummaskbits = sum(sum(mask == 1));
totalbits = (size(template1s1)*size(template1s2)) - nummaskbits;
C = xor(template1stemplate2);
C = C & ~mask;
bitsdiff = sum(sum(C==1));
if totalbits == 0
hd = NaN;
else
hd1 = bitsdiff / totalbits;
if hd1 < hd || isnan(hd)
hd = hd1;
end
end
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2342 2008-06-01 11:54 code\Normal_encoding\encode.m
文件 2715 2008-06-15 12:44 code\Normal_encoding\gaborconvolve.m
文件 5035 2003-11-30 13:24 code\Normal_encoding\normaliseiris.m
文件 2739 2008-06-15 12:26 code\Normal_encoding\gaborconvolve.asv
文件 2100 2008-05-26 09:31 code\Normal_encoding\encode.asv
文件 1472 2003-02-07 09:25 code\Segmentation\addcircle.m
文件 844 2003-02-11 18:57 code\Segmentation\adjgamma.m
文件 2219 2003-11-25 11:11 code\Segmentation\canny.m
文件 1622 2003-11-30 12:20 code\Segmentation\circlecoords.m
文件 2321 2003-11-25 09:42 code\Segmentation\findcircle.m
文件 1090 2003-11-25 10:56 code\Segmentation\findline.m
文件 917 2003-11-25 09:41 code\Segmentation\houghcircle.m
文件 3304 2003-02-11 18:34 code\Segmentation\hysthresh.m
文件 812 2003-11-25 09:23 code\Segmentation\linecoords.m
文件 3683 2003-02-11 18:34 code\Segmentation\nonmaxsup.m
文件 3261 2003-11-25 10:09 code\Segmentation\segmentiris.m
文件 1947 2008-06-01 11:53 code\Matching\gethammingdistance.m
文件 1552 2003-11-28 15:59 code\Matching\shiftbits.m
文件 1786 2008-05-26 10:51 code\Matching\gethammingdistance.asv
目录 0 2008-05-09 15:15 code\Normal_encoding
目录 0 2008-05-09 15:15 code\Segmentation
目录 0 2008-05-09 15:15 code\Matching
目录 0 2008-12-17 12:30 code
----------- --------- ---------- ----- ----
41761 23
评论
共有 条评论