Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function varargout = m1014_1fig(varargin)
- % M1014_1FIG MATLAB code for m1014_1fig.fig
- % M1014_1FIG, by itself, creates a new M1014_1FIG or raises the existing
- % singleton*.
- %
- % H = M1014_1FIG returns the handle to a new M1014_1FIG or the handle to
- % the existing singleton*.
- %
- % M1014_1FIG('CALLBACK',hObject,eventData,handles,...) calls the local
- % function named CALLBACK in M1014_1FIG.M with the given input arguments.
- %
- % M1014_1FIG('Property','Value',...) creates a new M1014_1FIG or raises the
- % existing singleton*. Starting from the left, property value pairs are
- % applied to the GUI before m1014_1fig_OpeningFcn gets called. An
- % unrecognized property name or invalid value makes property application
- % stop. All inputs are passed to m1014_1fig_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 m1014_1fig
- % Last Modified by GUIDE v2.5 14-Jan-2021 00:57:23
- % Begin initialization code - DO NOT EDIT
- gui_Singleton = 1;
- gui_State = struct('gui_Name', mfilename, ...
- 'gui_Singleton', gui_Singleton, ...
- 'gui_OpeningFcn', @m1014_1fig_OpeningFcn, ...
- 'gui_OutputFcn', @m1014_1fig_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 m1014_1fig is made visible.
- function m1014_1fig_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 m1014_1fig (see VARARGIN)
- % Choose default command line output for m1014_1fig
- handles.output = hObject;
- % Update handles structure
- guidata(hObject, handles);
- % UIWAIT makes m1014_1fig wait for user response (see UIRESUME)
- % uiwait(handles.figure1);
- % --- Outputs from this function are returned to the command line.
- function varargout = m1014_1fig_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 Untitled_1_Callback(hObject, eventdata, handles)
- % hObject handle to Untitled_1 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --------------------------------------------------------------------
- function Untitled_2_Callback(hObject, eventdata, handles)
- % hObject handle to Untitled_2 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- imo=handles.im1;
- ime=handles.im2;
- [r c p]=size(ime);
- imo(100:100+r-1,200:200+c-1,:)=imo(100:100+r-1,200:200+c-1,:)+ime*0.3;
- axes(handles.axes3);
- imshow(imo);
- handles.ime=imo;
- handles.r=r;
- handles.c=c;
- guidata(hObject,handles);
- % --------------------------------------------------------------------
- function Untitled_5_Callback(hObject, eventdata, handles)
- % hObject handle to Untitled_5 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- imo=handles.im1;
- ime=handles.ime;
- r=handles.r;
- c=handles.c;
- ex=ime(100:100+r-1,200:200+c-1,:)-imo(100:100+r-1,200:200+c-1,:);
- ex=ex/0.3;
- axes(handles.axes4);
- imshow(ex);
- % --------------------------------------------------------------------
- function Untitled_3_Callback(hObject, eventdata, handles)
- % hObject handle to Untitled_3 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- [f p]=uigetfile('*.jpg');
- pf=[p f];
- im=imread(pf);
- axes(handles.axes1);
- imshow(im);
- handles.im1=im;
- guidata(hObject,handles);
- % --------------------------------------------------------------------
- function Untitled_4_Callback(hObject, eventdata, handles)
- % hObject handle to Untitled_4 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- [f p]=uigetfile('*.jpg');
- pf=[p f];
- im=imread(pf);
- axes(handles.axes2);
- imshow(im);
- handles.im2=im;
- guidata(hObject,handles);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement