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实现指纹识别技术完整源码+数据(高分课程设计).zip 已获导师指导并通过的高分毕业设计项目,也可作为课程设计和期末大作业,下载即用无需修改,项目完整确保可以运行。 基于Matlab实现指纹识别技术完整源码+数据(高分课程设计).zip 已获导师指导并通过的高分毕业设计项目,也可作为课程设计和期末大作业,下载即用无需修改,项目完整确保可以运行。 基于Matlab实现指纹识别技术完整源码+数据(高分课程设计).zip 已获导师指导并通过的高分毕业设计项目,也可作为课程设计和期末大作业,下载即用无需修改,项目完整确保可以运行。 基于Matlab实现指纹识别技术完整源码+数据(高分课程设计).zip 已获导师指导并通过的高分毕业设计项目,也可作为课程设计和期末大作业,下载即用无需修改,项目完整确保可以运行。 基于Matlab实现指纹识别技术完整源码+数据(高分课程设计).zip 已获导师指导并通过的高分毕业设计项目,也可作为课程设计和期末大作业,下载即用无需修改,项目完整确保可以运行。 基于Matlab实现指纹识别技术完整源码+数据(高分课程设计).zip 已获导师指导并
资源推荐
资源详情
资源评论
收起资源包目录
指纹识别matlab.zip (33个子文件)
指纹识别matlab
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
资源评论
- 被高数搞emo的小白6282023-12-07感谢大佬分享的资源,对我启发很大,给了我新的灵感。
- m0_735260112023-11-20内容与描述一致,超赞的资源,值得借鉴的内容很多,支持!
- l_liw2024-01-01支持这个资源,内容详细,主要是能解决当下的问题,感谢大佬分享~
- lmj5112023-12-15感谢大佬,让我及时解决了当下的问题,解燃眉之急,必须支持!
猰貐的新时代
- 粉丝: 1w+
- 资源: 2585
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于 Ant 的 Java 项目示例.zip
- 各种字符串相似度和距离算法的实现Levenshtein、Jaro-winkler、n-Gram、Q-Gram、Jaccard index、最长公共子序列编辑距离、余弦相似度…….zip
- 运用python生成的跳跃的爱心
- 包括用 Java 编写的程序 欢迎您在此做出贡献!.zip
- (源码)基于QT框架的学生管理系统.zip
- 功能齐全的 Java Socket.IO 客户端库,兼容 Socket.IO v1.0 及更高版本 .zip
- 功能性 javascript 研讨会 无需任何库(即无需下划线),只需 ES5 .zip
- 分享Java相关的东西 - Java安全漫谈笔记相关内容.zip
- 具有适合 Java 应用程序的顺序定义的 Cloud Native Buildpack.zip
- 网络建设运维资料库职业
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功