虹膜识别 Matlab

  • r3_521346
    了解作者
  • 18.8KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-13 01:18
    上传日期
虹膜识别 Matlab代码 Author: Libor Masek
iris.rar
  • code
  • Matching
  • gethammingdistance.m
    1.9KB
  • shiftbits.m
    1.5KB
  • gethammingdistance.asv
    1.7KB
  • Segmentation
  • segmentiris.m
    3.2KB
  • findcircle.m
    2.3KB
  • adjgamma.m
    844B
  • canny.m
    2.2KB
  • linecoords.m
    812B
  • houghcircle.m
    917B
  • hysthresh.m
    3.2KB
  • addcircle.m
    1.4KB
  • nonmaxsup.m
    3.6KB
  • circlecoords.m
    1.6KB
  • findline.m
    1.1KB
  • Normal_encoding
  • encode.asv
    2.1KB
  • gaborconvolve.asv
    2.7KB
  • gaborconvolve.m
    2.7KB
  • encode.m
    2.3KB
  • normaliseiris.m
    4.9KB
内容介绍
% normaliseiris - performs normalisation of the iris region by % unwraping the circular region into a rectangular block of % constant dimensions. % % Usage: % [polar_array, polar_noise] = normaliseiris(image, x_iris, y_iris, r_iris,... % x_pupil, y_pupil, r_pupil,eyeimage_filename, radpixels, angulardiv) % % Arguments: % image - the input eye image to extract iris data from % x_iris - the x coordinate of the circle defining the iris % boundary % y_iris - the y coordinate of the circle defining the iris % boundary % r_iris - the radius of the circle defining the iris % boundary % x_pupil - the x coordinate of the circle defining the pupil % boundary % y_pupil - the y coordinate of the circle defining the pupil % boundary % r_pupil - the radius of the circle defining the pupil % boundary % eyeimage_filename - original filename of the input eye image % radpixels - radial resolution, defines vertical dimension of % normalised representation % angulardiv - angular resolution, defines horizontal dimension % of normalised representation % % Output: % polar_array % polar_noise % % Author: % Libor Masek % masekl01@csse.uwa.edu.au % School of Computer Science & Software Engineering % The University of Western Australia % November 2003 function [polar_array, polar_noise] = normaliseiris(image, x_iris, y_iris, r_iris,... x_pupil, y_pupil, r_pupil,eyeimage_filename, radpixels, angulardiv) global DIAGPATH radiuspixels = radpixels + 2; angledivisions = angulardiv-1; r = 0:(radiuspixels-1); theta = 0:2*pi/angledivisions:2*pi; x_iris = double(x_iris); y_iris = double(y_iris); r_iris = double(r_iris); x_pupil = double(x_pupil); y_pupil = double(y_pupil); r_pupil = double(r_pupil); % calculate displacement of pupil center from the iris center ox = x_pupil - x_iris; oy = y_pupil - y_iris; if ox <= 0 sgn = -1; elseif ox > 0 sgn = 1; end if ox==0 && oy > 0 sgn = 1; end r = double(r); theta = double(theta); a = ones(1,angledivisions+1)* (ox^2 + oy^2); % need to do something for ox = 0 if ox == 0 phi = pi/2; else phi = atan(oy/ox); end b = sgn.*cos(pi - phi - theta); % calculate radius around the iris as a function of the angle r = (sqrt(a).*b) + ( sqrt( a.*(b.^2) - (a - (r_iris^2)))); r = r - r_pupil; rmat = ones(1,radiuspixels)'*r; rmat = rmat.* (ones(angledivisions+1,1)*[0:1/(radiuspixels-1):1])'; rmat = rmat + r_pupil; % exclude values at the boundary of the pupil iris border, and the iris scelra border % as these may not correspond to areas in the iris region and will introduce noise. % % ie don't take the outside rings as iris data. rmat = rmat(2:(radiuspixels-1), :); % calculate cartesian location of each data point around the circular iris % region xcosmat = ones(radiuspixels-2,1)*cos(theta); xsinmat = ones(radiuspixels-2,1)*sin(theta); xo = rmat.*xcosmat; yo = rmat.*xsinmat; xo = x_pupil+xo; yo = y_pupil-yo; % extract intensity values into the normalised polar representation through % interpolation [x,y] = meshgrid(1:size(image,2),1:size(image,1)); polar_array = interp2(x,y,image,xo,yo); % create noise array with location of NaNs in polar_array polar_noise = zeros(size(polar_array)); coords = find(isnan(polar_array)); polar_noise(coords) = 1; polar_array = double(polar_array)./255; % start diagnostics, writing out eye image with rings overlayed % get rid of outling points in order to write out the circular pattern coords = find(xo > size(image,2)); xo(coords) = size(image,2); coords = find(xo < 1); xo(coords) = 1; coords = find(yo > size(image,1)); yo(coords) = size(image,1); coords = find(yo<1); yo(coords) = 1; xo = round(xo); yo = round(yo); xo = int32(xo); yo = int32(yo); ind1 = sub2ind(size(image),double(yo),double(xo)); image = uint8(image); image(ind1) = 255; %get pixel coords for circle around iris [x,y] = circlecoords([x_iris,y_iris],r_iris,size(image)); ind2 = sub2ind(size(image),double(y),double(x)); %get pixel coords for circle around pupil [xp,yp] = circlecoords([x_pupil,y_pupil],r_pupil,size(image)); ind1 = sub2ind(size(image),double(yp),double(xp)); image(ind2) = 255; image(ind1) = 255; % write out rings overlaying original iris image w = cd; cd(DIAGPATH); imwrite(image,[eyeimage_filename,'-normal.jpg'],'jpg'); cd(w); % end diagnostics %replace NaNs before performing feature encoding coords = find(isnan(polar_array)); polar_array2 = polar_array; polar_array2(coords) = 0.5; avg = sum(sum(polar_array2)) / (size(polar_array,1)*size(polar_array,2)); polar_array(coords) = avg;
评论
    相关推荐
    • Matlab合集
      冈萨雷斯数字图像处理MATLAB版.中文版+数字图像处理第二版中文版(冈萨雷斯)+MATLAB-R2014a完全自学一本通+MATLAB R2016a完全自学一本通 素材文件+[模式识别与智能计算:MATLAB技术实现(第2版)].杨淑莹.扫描版
    • Matlab教程
      MatlaB经典ppt,主要讲解了MatlaB的入门知识,图形编程以及仿真。
    • matlab 课件
      matlab 功能很强大,本课件详细的介绍了matlab在科学计算中的应用。
    • matlab编译器
      matlab编译为exe文件所需要的文件; 使用时解压,将解压后文件拖入至matlab命令行即可
    • matlab
      matlab的基础知识进行介绍
    • MatLab
      “#MatLab
    • MATLAB编译器
      基于MATLAB 2018b版本介绍MATLAB编译器。介绍如何利用编译器将MATLAB代码编译为独立应用程序或组件,并在没有安装MATLAB的计算机上进行部署。
    • matlab入门
      matlab的入门教程,很值得仔细看看,对提高matlab能力有帮助
    • matlab
      matlab经典课堂讲义
    • matlab
      matlab