HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

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

18,889 views September 26, 2020 11:57

Watch on YouTube
ChannelKnowledge Amplifier

Description from the creator

Prerequisite:
Noise Removal in colored Images using Median Filter | MATLAB
youtu.be/GCC52JCBbX0
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:
youtube.com/playlist?list=PLjfRmoYoxpNoaZmR2OTV…

Learn Digital Signal Processing using MATLAB:
youtube.com/playlist?list=PLjfRmoYoxpNr3w6baU91…

Learn Complete Image Processing & Computer Vision using MATLAB:
youtube.com/playlist?list=PLjfRmoYoxpNostbIaNSp…

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

#DigitalImageProcessing #MATLAB #ComputerVision

About this tutorial

Knowledge Amplifier published this 11:57 video tutorial on September 26, 2020. It has been watched 18,889 times on YouTube.

Duration
11:57
Published
September 26, 2020
Views
18,889
Likes
229

Tags

Share

Further reading

  • Slider using GUI in matlab (Image processing) - MATLAB ... fr.mathworks.com

    Slider using GUI in matlab (Image processing) Follow 68 views (last 30 days) José González on 12 Oct 2015. Vote. 1 ⋮ Vote. 1. Commented: José González on 13 Oct 2015 Accepted Answer: Geoff Hayes. Hi, I´ve got this progr…

  • Share Data Within App Designer Apps - MATLAB & Simulink mathworks.com

    Share Data Within App Designer Apps. Using properties is the best way to share data within an app because properties are accessible to all functions and callbacks in an app. All UI components are properties, so you can…

  • Share Data Among Callbacks - MATLAB & Simulink mathworks.com

    Share Data Among Callbacks Overview of Data Sharing Techniques. Many apps contain interdependent controls, menus, and graphics objects. Since each callback function has its own scope, you must explicitly share data with…

This tutorial in other languages