% createiristemplate - generates a biometric template from an iris in
% an eye image.
%
% Usage:
% [template, mask] = createiristemplate(eyeimage_filename)
%
% Arguments:
% eyeimage_filename - the file name of the eye image
%
% Output:
% template - the binary iris biometric template
% mask - the binary iris noise mask
function [template, mask] = createiristemplate(eyeimage)
close all
clc
global eyeimage_filename
% path for writing diagnostic images
global DIAGPATH
DIAGPATH = 'D:\iris templates';
%normalisation parameters
radial_res = 20;
angular_res = 240;
% with these settings a 9600 bit iris template is
% created
%feature encoding parameters
nscales=1;
minWaveLength=18;
mult=1; % not applicable if using nscales = 1
sigmaOnf=0.5;
savefile = [ eyeimage_filename,'-houghpara.mat'];
[stat,mess]=fileattrib(savefile);
if stat == 1
% if this file has been processed before
% then load the circle parameters and
% noise information for that file.
load(savefile);
else
% if this file has not been processed before
% then perform automatic segmentation and
% save the results to a file
[circleiris circlepupil imagewithnoise] = segmentiris(eyeimage);
save(savefile,'circleiris','circlepupil','imagewithnoise');
end
% WRITE NOISE IMAGE
%
imagewithnoise2 = uint8(imagewithnoise);
imagewithcircles = uint8(eyeimage);
%get pixel coords for circle around iris
[x,y] = circlecoords([circleiris(2),circleiris(1)],circleiris(3),size(eyeimage));
plot (y,x);hold on
ind2 = sub2ind(size(eyeimage),double(y),double(x));
%get pixel coords for circle around pupil
[xp,yp] = circlecoords([circlepupil(2),circlepupil(1)],circlepupil(3),size(eyeimage));
plot (yp,xp);hold off
ind1 = sub2ind(size(eyeimage),double(yp),double(xp));
% Write noise regions
imagewithnoise2(ind2) = 255;
figure(3), imshow(imagewithnoise2);
imagewithnoise2(ind1) = 255;
figure(4), imshow(imagewithnoise2);
% Write circles overlayed
imagewithcircles(ind2) = 255;
imagewithcircles(ind1) = 255;
w = cd;
cd(DIAGPATH);
imwrite(imagewithnoise2,[ eyeimage_filename,'-noise.jpg'],'jpg');
imwrite(imagewithcircles,[ eyeimage_filename,'-segmented.jpg'],'jpg');
cd(w);
% perform normalisation
[polar_array noise_array] = normaliseiris(imagewithnoise, circleiris(2),...
circleiris(1), circleiris(3), circlepupil(2), circlepupil(1), circlepupil(3),eyeimage_filename, radial_res, angular_res);
% WRITE NORMALISED PATTERN, AND NOISE PATTERN
w = cd;
cd(DIAGPATH);
imwrite(polar_array,[ eyeimage_filename,'-polar.jpg'],'jpg');
imwrite(noise_array,[ eyeimage_filename,'-polarnoise.jpg'],'jpg');
cd(w);
% perform feature encoding
[template mask] = encode(polar_array, noise_array, nscales, minWaveLength, mult, sigmaOnf);
figure(500);imshow(template);
iris_feature_extraction.rar_gabor extraction_gabor feature_gabor
版权申诉
51 浏览量
2022-09-23
10:05:41
上传
评论
收藏 3KB RAR 举报
林当时
- 粉丝: 97
- 资源: 1万+
最新资源
- # 微信小程序-健康菜谱 基于微信小程序的一个查找检索菜谱的应用 ### 效果 !动态图(./res/gif/demo
- zabbix-get命令包资源
- 毕业设计,基于PyQt5实现的可视化界面的Python车牌自动识别系统源码
- 26-朴素贝叶斯分类.rar
- 没有安Matlab 也可以 生成FIR抽头系数工具.py
- python烟花代码.rar
- 实验目的: 1.构建基于verilog语言的组合逻辑电路和时序逻辑电路; 2.掌握verilog语言的电路设计技巧 3.完成如
- 扩展卡尔曼滤波matlab仿真
- 3_base.apk.1
- 躺赢者PRO飞控常见典型问题合集(续一)无名小哥 余义 20240501待修
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈