function varargout = operations(varargin)
% OPERATIONS MATLAB code for operations.fig
% OPERATIONS, by itself, creates a new OPERATIONS or raises the existing
% singleton*.
%
% H = OPERATIONS returns the handle to a new OPERATIONS or the handle to
% the existing singleton*.
%
% OPERATIONS('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in OPERATIONS.M with the given input arguments.
%
% OPERATIONS('Property','Value',...) creates a new OPERATIONS or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before operations_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to operations_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help operations
% Last Modified by GUIDE v2.5 14-Apr-2021 16:12:14
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @operations_OpeningFcn, ...
'gui_OutputFcn', @operations_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before operations is made visible.
function operations_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to operations (see VARARGIN)
% Choose default command line output for operations
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% uiwait(handles.figure1);
% UIWAIT makes operations wait for user response (see UIRESUME)
% uiwait(handles.figure2);
% --- Outputs from this function are returned to the command line.
function varargout = operations_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
%程序进入等待状态,等待用户的操作。当用户点击button时,程序会调用这个按钮的回调函数,对事件进行处理!
% varargout{1}=handles.im1;
% varargout{2}=handles.x0;
% varargout{3}=handles.y0;
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
cla(handles.axes1,'reset');
cla(handles.axes2,'reset');
[FileName,PathName] = uigetfile('*.jpg;*.tif','Select the jpg-file','testfingerprinter');%FileName:返回的文件名,PathName:返回的文件的路径名,FilterIndex:选择的文件类型,FilterSpec:文件类型设置,DialogTitle:打开对话框的标题,DefaultName:默认指向的文件名
file=[PathName,FileName];
im1 = imread(file);
im1=imresize(im1,[256,256]);
axes(handles.axes1);%打开axes1的句柄 进行axes1的操作
imshow(im1);
title('指纹原图像');
handles.im1=im1;
set(gcf,'UserData',im1);
set(handles.pushbutton2,'enable','on');
guidata(hObject,handles);
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
cla(handles.axes2,'reset');
global x0;global y0;
im1=get(gcf,'UserData');
if isempty(im1)
errordlg('请输入指纹','警告');
return;
end
image_size=size(im1);
dimension=numel(image_size);%分辨im1是灰度图像还是彩色图像,如果dimension的维度是二维,是灰度图像。如果维度是三维,是彩色图像
if dimension==2
I=im2double(im1);%将矩阵数据类型转换成double型
% img_bw=gbfilter(I);
dk=daikuan(1.5);
[img_bw,gbfall]=gbfilter1(I,6,1,0,dk);
im2=normalize(gbfall);%归一化和切割
im3=derection_bw(im2);%二值化
[x0,y0]=centerpoint(im3);%求取指纹中心点(x0,y0)
end
if dimension==3
I=rgb2gray(im2double(im1));%将彩色图像转换成灰度图像
% img_bw=gbfilter(I);
dk=daikuan(1.5);
[img_bw,gbfall]=gbfilter1(I,6,1,0,dk);
im2=normalize(gbfall);%归一化和切割
im3=derection_bw(im2);%二值化
[x0,y0]=centerpoint(im3);
end
axes(handles.axes2);
imshow(im1);
title('指纹图像中心点');
hold on;plot(x0,y0,'ro');hold off;
handles.im1=im3;
handles.x0=x0;
handles.y0=y0;
set(gcf,'UserData',{I,x0,y0});
set(hObject,'enable','off');
guidata(hObject,handles);
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(operations,'Visible','off');
global x0;global y0;global nameta;
global gama;global phi;global dk;
[gbfall,nameta,gama,phi,dk]=operations1;%调出子界面,运行完返回,将结果赋给Gabor滤波结果和nameta
axes(handles.axes2);
imshow(gbfall);
set(operations,'Visible','off');
title('Gabor滤波后');
hold on;plot(x0,y0,'ro');hold off;
guidata(hObject,handles);
set(gcf,'UserData',{gbfall,x0,y0});
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
cla(handles.axes2,'reset');
X=get(gcf,'UserData');
if isempty(X)
errordlg('请输入指纹','警告');
return;
end
im4=X{1};
x0=X{2};
y0=X{3};
im5=derection_bw(im4);%二值化
axes(handles.axes2);
imshow(im5);
title('二值化后');
hold on;plot(x0,y0,'ro');hold off;
set(gcf,'UserData',{im5,x0,y0});
% --- Executes on button press in pushbutton4.
function pushbutton5_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
cla(handles.axes2,'reset');
X=get(gcf,'UserData');
if isempty(X)
errordlg('请输入指纹','警告');
return;
end
if iscell(X)
im5=X{1};
x0=X{2};
y0=X{3};
% im5=handles.im1;
% x0=handles.x0;
% y0=handles.y0;
theta0=LL
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
基于MATLAB指纹识别系统+GUI界面的毕业设计完整源码+全部数据(高分项目).zip 已获导师指导并通过的高分毕业设计项目,也可作为课程设计和期末大作业,下载即用无需修改,项目完整确保可以运行。 基于MATLAB指纹识别系统+GUI界面的毕业设计完整源码+全部数据(高分项目).zip 已获导师指导并通过的高分毕业设计项目,也可作为课程设计和期末大作业,下载即用无需修改,项目完整确保可以运行。基于MATLAB指纹识别系统+GUI界面的毕业设计完整源码+全部数据(高分项目).zip 已获导师指导并通过的高分毕业设计项目,也可作为课程设计和期末大作业,下载即用无需修改,项目完整确保可以运行。基于MATLAB指纹识别系统+GUI界面的毕业设计完整源码+全部数据(高分项目).zip 已获导师指导并通过的高分毕业设计项目,也可作为课程设计和期末大作业,下载即用无需修改,项目完整确保可以运行。基于MATLAB指纹识别系统+GUI界面的毕业设计完整源码+全部数据(高分项目).zip 已获导师指导并通过的高分毕业设计项目,也可作为课程设计和期末大作业,下载即用无需修改,项目完整确保可以
资源推荐
资源详情
资源评论
收起资源包目录
基于MATLAB指纹识别系统+GUI界面的毕业设计(完整源码.zip (33个子文件)
基于MATLAB指纹识别系统+GUI界面的毕业设计(完整源码
LL_angle.m 2KB
width.m 729B
grid.m 5KB
width0507.m 1KB
operations1.m 9KB
daikuan.m 79B
derection_bw.m 2KB
operations.m 10KB
Val_ri_Fre.m 797B
main.m 1KB
normalize.m 1KB
gbfilter.m 993B
gbfilter1.m 829B
match1.m 2KB
grid1.m 4KB
match.m 3KB
centerpoint.m 4KB
fingerprint_library
2.jpg 88KB
1.jpg 41KB
3.jpg 92KB
4.jpg 92KB
LL_angle0507.m 681B
LL_angle2.m 1KB
operations1.fig 120KB
testfingerprint
4-2.tif 88KB
1-2.tif 92KB
2-2.jpg 40KB
4-1.tif 88KB
1-1.tif 92KB
3-1.jpg 92KB
3-1.tif 92KB
2-1.jpg 41KB
operations.fig 38KB
共 33 条
- 1
资源评论
- 任谁2024-03-07发现一个宝藏资源,赶紧冲冲冲!支持大佬~
- jianchao1233212024-03-05实在是宝藏资源、宝藏分享者!感谢大佬~
- 2301_813795892024-06-20资源内容总结地很全面,值得借鉴,对我来说很有用,解决了我的燃眉之急。
- 2301_797587562023-12-29感谢资源主的分享,这个资源对我来说很有用,内容描述详尽,值得借鉴。
- 2301_783757522023-12-19资源是宝藏资源,实用也是真的实用,感谢大佬分享~
猰貐的新时代
- 粉丝: 1w+
- 资源: 2886
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功