-
大小: 21KB文件類型: .m金幣: 1下載: 0 次發布日期: 2021-06-05
- 語言: Matlab
- 標簽:
資源簡介
基于Gabor濾波指紋識別算法matlab完整程序,過程是定位中心點,裁剪圖像大小,以參考點為圓心做同心環作為特征提取區域,對特征提取區域做歸一化處理
代碼片段和文件信息
function?fpextractdemo(action?varargin)
% FPEXTRACTDEMO?指紋特征提取演示程序
%???Modified?by?PRTsinghua@hotmail.com
%
%?輸入圖像必須是256×256的灰度圖
%?8-bit灰度級的圖像?@?500?dpi.
%?如果這些條件不滿足,一些函數中的參數必須做相應的改變
%?
%??
%???選項:
%?????-?Centralize:????二值化圖像,計算中心點
%?????-?Crop:??????????圖像修剪
%?????-?Sectorize:?????可視化扇形
%?????-?Normalize:?????歸一化輸入圖像
%?????-?Gabor?filters:?可視化Gabor濾波器
%?????-?Convolute:?????計算輸入圖像和Gabor濾波器的convolution
%?????-?Features:??????特征可視化
%?????-?FingerCode:????在數據庫中加入該指紋
%?????-?Check:?????????指紋匹配
%
%
%?指紋識別中一個至關重要的步驟就是中心點的確定。如果剪切指紋圖像時出現了任何
%?錯誤,你可以使用輔助的m文件“vedicentro.m“:它使得輸入指紋可視化并計算指紋
%?中心,借助于m函數?“centralizing.m“。
%
%?在MATLAB的命令行提示中輸入?“fpextractdemo“?運行程序
%--------------------------------------------------------------------------
if?nargin<1
????action=‘InitializeFPEXTRACTDEMO‘;
end;
feval(actionvarargin{:})
return;
%%%
%%%??子函數?-?InitializeFPEXTRACTDEMO
%%%
function?InitializeFPEXTRACTDEMO()
%?如果?fpextractdemo?已經在運行,將之轉到前臺
h?=?findobj(allchild(0)?‘tag‘?‘Extracting?FingerPrint?Features?Demo?‘);
???%child_handles?=?allchild(handle_list)
???%返回由handle_list所指定的對象的所有子對象的句柄,包括句柄設置為隱藏的子對象的句柄。
???%如果handle_list為標量,則返回的?child_handles是一個向量;否則,輸出的是元胞數組。?Matlab中文論壇?
???%findobj函數用來查找指定的圖形對象并返回它們的句柄。用戶可以使用特定的屬性值來限制查找的范圍。
if?~isempty(h)
????figure(h(1))
????return
end
screenD?=?get(0?‘ScreenDepth‘);
if?screenD>8
????grayres=256;
else
????grayres=128;
end
FpextractDemoFig?=?figure(?...
????‘Name‘‘指紋特征提取演示程序?Modified?by??PRTsinghua@hotmail.com‘?...
????‘Numbertitle‘‘off‘?‘HandleVisibility‘?‘on‘?...?
????‘tag‘?‘指紋特征提取演示程序‘?...
????‘Visible‘‘off‘?‘Resize‘?‘off‘...
????‘BusyAction‘‘Queue‘‘Interruptible‘‘off‘?...
????‘Color‘?[.8?.8?.8]?...
????‘IntegerHandle‘?‘off‘?...
????‘Colormap‘?gray(grayres));
???%figure(‘PropertyName‘propertyvalue...)利用指定的屬性值來創建圖形窗口對象
figpos?=?get(FpextractDemoFig?‘position‘);
figpos?=?[100100800500];
%?Adjust?the?size?of?the?figure?window
horizDecorations?=?10;??%?調整大小.
vertDecorations?=?45;???%?標題欄.
screenSize?=?get(0‘ScreenSize‘);
dx?=?screenSize(3)?-?figpos(1)?-?figpos(3)?-?horizDecorations;
dy?=?screenSize(4)?-?figpos(2)?-?figpos(4)?-?vertDecorations;
if?(dx?0)
????figpos(1)?=?max(5figpos(1)?+?dx);
end
if?(dy?0)
????figpos(2)?=?max(5figpos(2)?+?dy);
end
set(FpextractDemoFig?‘position‘?figpos);
rows?=?figpos(4);?
cols?=?figpos(3);
%?Colors
bgcolor?=?[0.45?0.45?0.45]; %?背景顏色
wdcolor?=?[.8?.8?.8];?? %?Window?顏色
fgcolor?=?[1?1?1]; %?文本
hs?=?(cols-(6*175))?/?5; %?水平間隔
vs?=?(rows)/8; %?垂直間隔
%====================================
%?所有菜單和按鈕的參數
Std.Interruptible?=?‘off‘;
Std.BusyAction?=?‘queue‘;
%?Defaults?for?image?axes
Ax?=?Std;
Ax.Units?=?‘Pixels‘;
Ax.Parent?=?FpextractDemoFig;
Ax.ydir?=?‘reverse‘;
Ax.XLim?=?[.5?128.5];
Ax.YLim?=?[.5?128.5];
Ax.CLim?=?[0?1];
Ax.XTick?=?[];
Ax.YTick?=?[];
Img?=?Std;
Img.CData?=?[];
Img.Xdata?=?[1?128];
Img.Ydata?=?[1?128];
Img.CDat
- 上一篇:單腿跳躍機器人代碼
- 下一篇:matlab實現的維特比譯碼
評論
共有 條評論