📄 cubs_enroll.m
字号:
%--------------------------------------------------------------------------
% Version 1.0 March 2005
% Copyright (c) 2005-2010 by Center for Unified Biometrics and Sensors
% www.cubs.buffalo.edu
%
%cubs_enroll
%extracts the minutiae from a fingerprint image and writes them to the
%given template file
%syntax:
%cubs_enroll(image_file,template_file)
%image_file = name of the image file (can be 8 bit tif or bmp)
%template_file = name of the template file
%NOTE:
%The intermediate results are output in the files
% CUBSEnhanced.tif - Enhanced Image
% CUBSBinary.tif - Binarized Image
% CUBSContour_2.tif - Contour with potential minutiae highlighted
%Contact:
% ssc5@cubs.buffalo.edu sharat@mit.edu
% http://www.sharat.org
%Reference:
%1. S. Chikkerur, C.Wu and V. Govindaraju, "Systematic approach for feature
% extraction in Fingerprint Images", ICBA 2004
%2. S. Chikkerur and V. Govindaraju, "Fingerprint Image Enhancement using
% STFT Analysis", International Workshop on Pattern Recognition for Crime
% Prevention, Security and Surveillance, ICAPR 2005
%3. S. Chikkeur, "Online Fingerprint Verification", M. S. Thesis,
% University at Buffalo, 2005
%4. T. Jea and V. Govindaraju, "A Minutia-Based Partial Fingerprint Recognition System",
% to appear in Pattern Recognition 2005
%5. S. Chikkerur, "K-plet and CBFS: A Graph based Fingerprint
% Representation and Matching Algorithm", submitted, ICB 2006
% See also: cubs_visualize_template
%--------------------------------------------------------------------------
function cubs_enroll(image_file,template_file)
%------------------------------
%sanity check
%------------------------------
fid = fopen(image_file,'rb');
if(fid <0)
error('ERROR: Image file missing');
end;
%------------------------------
%call the implementation file
%------------------------------
cubs_enroll_internal(image_file,'_tmp.fp');
add_image_file('_tmp.fp',image_file,template_file);
delete('_tmp.fp');
%end function
%--------------------------------------------------------------------------
%helper function
%--------------------------------------------------------------------------
function add_image_file(infile,image_file,outfile)
fin = fopen(infile,'r');
fout = fopen(outfile,'w');
fprintf(fout,'[image_file]\n1\n%s\n',image_file);
s = fgets(fin);
while(s~=-1)
fprintf(fout,'%s',s);
s=fgets(fin);
end;
fclose(fin);
fclose(fout);
%end function add_image_file
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -