function varargout = guitest(varargin)
% GUITEST M-file for guitest.fig
% GUITEST, by itself, creates a new GUITEST or raises the existing
% singleton*.
%
% H = GUITEST returns the handle to a new GUITEST or the handle to
% the existing singleton*.
%
% GUITEST('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in GUITEST.M with the given input arguments.
%
% GUITEST('Property','Value',...) creates a new GUITEST or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before guitest_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to guitest_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 guitest
% Last Modified by GUIDE v2.5 18-Dec-2017 21:14:43
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @guitest_OpeningFcn, ...
'gui_OutputFcn', @guitest_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 guitest is made visible.
function guitest_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 guitest (see VARARGIN)
% Choose default command line output for guitest
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes guitest wait for user response (see UIRESUME)
% uiwait(handles.figure1_image);
setappdata(handles.figure1_image,'img_src',0);
% --- Outputs from this function are returned to the command line.
function varargout = guitest_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;
% --------------------------------------------------------------------
function m_file_Callback(hObject, eventdata, handles)
% hObject handle to m_file (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function m_file_open_Callback(hObject, eventdata, handles)
% hObject handle to m_file_open (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[filename, pathname] = uigetfile( ...
{'*.bmp;*.jpg;*.png;*.jpeg','Image Files (*.bmp, *.jpg, *.png,*.jpeg)'; ...
'*.*', 'All Files (*.*)'}, 'Pick an image');
if isequal(filename,0) || isequal(pathname,0),
return;
end
axes(handles.axes_src);%用axes命令设定当前操作的坐标轴是axes_src
fpath=[pathname filename];%将文件名和目录名组合成一个完整的路径
%imshow(imread(fpath));%用imread读入图片,并用imshow在axes_src上显示
img_src=imread(fpath);
imshow(img_src);
setappdata(handles.figure1_image,'img_src',img_src); %设置公用变量
% --------------------------------------------------------------------
function m_file_save_Callback(hObject, eventdata, handles)
% hObject handle to m_file_save (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[filename, pathname] = uiputfile({'*.bmp','BMP files';'*.jpg;','JPG files'}, 'Pick an Image');
if isequal(filename,0) || isequal(pathname,0)
return;%如果点了“取消”
else
fpath=fullfile(pathname, filename);%获得全路径的另一种方法
end
img_src=getappdata(handles.figure1_image,'img_src');%取得打开图片的数据
imwrite(img_src,fpath);%保存图片
% --------------------------------------------------------------------
function m_file_exit_Callback(hObject, eventdata, handles)
% hObject handle to m_file_exit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close(handles.figure1_image);
% --------------------------------------------------------------------
function m_dot_Callback(hObject, eventdata, handles)
% hObject handle to m_dot (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function m_dot_histgram_Callback(hObject, eventdata, handles)
% hObject handle to m_dot_histgram (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%set(handles.axes_dst,'Units','pixels');
%set(gca,'position',[323 97 251 251]);
axes(handles.axes_dst);%用axes命令设定当前操作的坐标轴是axes_dst
img_src=getappdata(handles.figure1_image,'img_src');%取得打开图片的数据
imhist(img_src);
% --------------------------------------------------------------------
function m_dot_scaling_Callback(hObject, eventdata, handles)
% hObject handle to m_dot_scaling (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function m_dot_thresh_Callback(hObject, eventdata, handles)
% hObject handle to m_dot_thresh (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function m_dot_histeq_Callback(hObject, eventdata, handles)
% hObject handle to m_dot_histeq (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function m_dot_highdui_Callback(hObject, eventdata, handles)
% hObject handle to m_dot_highdui (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%set(handles.axes_dst,'Units','pixels');
%set(gca,'position',[323 97 251 251]);
axes(handles.axes_src);%用axes命令设定当前操作的坐标轴是axes_dst
img_src=getappdata(handles.figure1_image,'img_src');%取得打开图片的数据
f=im2double(img_src);
I1 = 2*f-55/255;
imshow(I1);
axes(handles.axes_dst);%用axes命令设定当前操作的坐标轴是axes_dst
imshow(histeq(I1));
% --------------------------------------------------------------------
function m_dot_lowdui_Callback(hObject, eventdata, handles)
% hObject handle to m_dot_lowdui (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%set(handles.axes_dst,'Units','pixels');
%set(gca,'position',[323 97 251 251]);
img_src=getappdata(handles.figure1_image,'img_src');%取得打开图片的数据
f=im2double(img_src);
I2 = 0.5*f+55/255;
axes(handles.axes_src);%用
指纹识别含登录系统(1).rar.rar.rar.rar
需积分: 0 27 浏览量
2023-05-31
21:39:13
上传
评论
收藏 381KB RAR 举报
m0_71819986
- 粉丝: 0
- 资源: 1
最新资源
- 农村信用社联合社计算机信息系统投产与变更管理办.docx
- 农村信用社联合社计算机信息系统数据管理办法.docx
- 利用SPSS作临床效度分析线上计算网站介绍-医学研究部统计谘.(医学PPT课件).ppt
- 利用Zabbix监控mysqldump定时备份数据库状态.docx
- 利用计算机解决问题的基本过程.doc
- 化工铁路通信工程总结.doc
- 北京大学网络教育软件工程作业.docx
- 医药公司(连锁店)计算机操作规程未新系统的自行按照旧制修改-新系统过制的编号加修模版.doc
- 医药公司(连锁店)计算机系统操作规程模版.doc
- 医药连锁门店计算机系统的操作和管理程序未新系统的自行按照旧制修改-新系统过制的编号加修模版.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈