📄 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@eng.buffalo.edu
% www.eng.buffalo.edu/~ssc5
%Reference:
%S. Chikkerur,C. Wu and Govindaraju, "A Systematic approach for
%feature extraction in fingerprint images",ICBA 2004
%T. Jea and V. Govindaraju, "A Minutia-Based Partial Fingerprint Recognition System",
%to appear in Pattern Recognition 2005
%
% 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 + -