function varargout = pinghualvbo(varargin)
% PINGHUALVBO MATLAB code for pinghualvbo.fig
% PINGHUALVBO, by itself, creates a new PINGHUALVBO or raises the existing
% singleton*.
%
% H = PINGHUALVBO returns the handle to a new PINGHUALVBO or the handle to
% the existing singleton*.
%
% PINGHUALVBO('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in PINGHUALVBO.M with the given input arguments.
%
% PINGHUALVBO('Property','Value',...) creates a new PINGHUALVBO or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before pinghualvbo_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to pinghualvbo_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 pinghualvbo
% Last Modified by GUIDE v2.5 16-Mar-2020 14:46:30
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @pinghualvbo_OpeningFcn, ...
'gui_OutputFcn', @pinghualvbo_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 pinghualvbo is made visible.
function pinghualvbo_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 pinghualvbo (see VARARGIN)
% Choose default command line output for pinghualvbo
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes pinghualvbo wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = pinghualvbo_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 danxuan_jyzs_Callback(hObject, eventdata, handles)
jyzs=getimage(handles.axes1);
img=rgb2gray(jyzs);
jy=imnoise(img,'salt & pepper',0.03);
axes(handles.axes3);
disp(imshow(jy));
% 高斯噪声
function danxuan_gszs_Callback(hObject, eventdata, handles)
gszs=getimage(handles.axes1);
img1=rgb2gray(gszs);
gs=imnoise(img1,'gaussian',0.01);
axes(handles.axes3);
disp(imshow(gs));
%中值滤波
function danxuan_zzlb_Callback(hObject, eventdata, handles)
t_axes1=getimage(handles.axes3);
bzz=medfilt2(t_axes1,[3 3]);
axes(handles.axes2);
disp(imshow(bzz));
% 邻域滤波 function danxuan_lylb_Callback(hObject, eventdata, handles) t_axes3=getimage(handles.axes3); c=im2double(t_axes3); f1=inline('max(x(:))'); bly=nlfilter(c,[3 3],f1); axes(handles.axes2); disp(imshow(bly));
% 维纳滤波
function danxuan_wnlb_Callback(hObject, eventdata, handles)
t_axes2=getimage(handles.axes3);
bwn=wiener2(t_axes2,[7 7]);
axes(handles.axes2);
disp(imshow(bwn));
function anniu_drtp_Callback(hObject, eventdata, handles)
%%导入图片进axse1
[drtp,path] = uigetfile('*.jpg;*.png');
if isequal(drtp,0)| isequal(drtp,0) errordlg('没有选中文件','出错');
return;
disp('User selected Cancel') %用户选择取消
else
axes(handles.axes1); %吧导入的图片放进axes1
disp(imshow(drtp)); %显示导入的图片
end
function anniu_bctp_Callback(~, ~, handles)
%保存图片
[bctp,path] = uiputfile('*.jpg');
if isequal(bctp,0);
disp('User selected Cancel') %用户选择取消
else
t=getimage(handles.axes2); %吧axes2里的图给t
imwrite(t,bctp,'jpg'); %保存t
end
function anniu_tc_Callback(hObject, eventdata, handles)
close(gcf)
chengpin3
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
pinghualvbo.zip (5个子文件)
pinghualvbo.m 4KB
zhutu2.png 214KB
pinghualvbo.fig 77KB
zhutu1.png 542KB
zhutu.png 464KB
共 5 条
- 1
向前@DM
- 粉丝: 3
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页