How to pass data within GUI functions (MATLAB GUI Tutorial with Image Processing )

Publicado el: 12 septiembre 2020
en el canal de: Knowledge Amplifier
18,607
233

Prerequisite:
Noise Removal in colored Images using Median Filter | MATLAB
   • Noise Removal in colored Images using...  
Code :
function varargout = App(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @App_OpeningFcn, ...
'gui_OutputFcn', @App_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 App is made visible.
function App_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 App (see VARARGIN)

% Choose default command line output for App
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes App wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = App_OutputFcn(hObject, eventdata, handles)
varargout{1} = handles.output;


% --- Executes on button press in Browse.
function Browse_Callback(hObject, eventdata, handles)
[filename, pathname] = uigetfile('*.*', 'Pick a MATLAB code file');
if isequal(filename,0) || isequal(pathname,0)
disp('User pressed cancel')
else
filename=strcat(pathname,filename);
a=imread(filename);
axes(handles.axes1);
imshow(a);
handles.o=a;
guidata(hObject, handles);
end


% --- Executes on button press in Add_Noise.
function Add_Noise_Callback(hObject, eventdata, handles)
J=handles.o;
J =imnoise(J,'salt & pepper', 0.4);
axes(handles.axes2);
imshow(J);
handles.J=J;
guidata(hObject, handles);




% --- Executes on button press in Remove_Noise.
function Remove_Noise_Callback(hObject, eventdata, handles)
J=handles.J;
p=medfilt3(J,[5,5,3]);
axes(handles.axes3);
imshow(p);


Learn Complete Machine Learning & Data Science using MATLAB:
   • Data Science & Machine Learning using...  

Learn Digital Signal Processing using MATLAB:
   • Digital Signal Processing Matlab  

Learn Complete Image Processing & Computer Vision using MATLAB:
   • Digital Image Processing using MATLAB  

🙏🙏🙏🙏🙏🙏🙏🙏
YOU JUST NEED TO DO
3 THINGS to support my channel
LIKE
SHARE
&
SUBSCRIBE
TO MY YOUTUBE CHANNEL

#DigitalImageProcessing #MATLAB #ComputerVision


En esta página del sitio puede ver el video en línea How to pass data within GUI functions (MATLAB GUI Tutorial with Image Processing ) de Duración hora minuto segunda en buena calidad , que subió el usuario Knowledge Amplifier 12 septiembre 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 18,607 veces y le gustó 233 a los espectadores. Disfruta viendo!