1 简介2 部分代码登录后复制 function varargout = gui(varargin)1.登录后复制 % GUI M-file for gui.fig1.登录后复制 % GUI, by itself, creates a new GUI or raises the existing1.登录后复制 % singleton*.1.登录后复制 %1.登录后复制 % H = GUI returns the handle to a new GUI or the handle to1.登录后复制 % the existing singleton*.1.登录后复制 %1.登录后复制 % GUI('CALLBACK',hObject,eventData,handles,...) calls the local1.登录后复制 % function named CALLBACK in GUI.M with the given input arguments.1.登录后复制 %1.登录后复制 % GUI('Property','Value',...) creates a new GUI or raises the1.登录后复制 % existing singleton*. Starting from the left, property value pairs are1.登录后复制 % applied to the GUI before gui_OpeningFcn gets called. An1.登录后复制 % unrecognized property name or invalid value makes property application1.登录后复制 % stop. All inputs are passed to gui_OpeningFcn via varargin.1.登录后复制 %1.登录后复制 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one1.登录后复制 % instance to run (singleton)".1.登录后复制 %1.登录后复制 % See also: GUIDE, GUIDATA, GUIHANDLES1.登录后复制 1.登录后复制 % Edit the above text to modify the response to help gui1.登录后复制 1.登录后复制 % Last Modified by GUIDE v2.5 27-May-2011 17:39:181.登录后复制 1.登录后复制 % Begin initialization code - DO NOT EDIT1.登录后复制 gui_Singleton = 1;1.登录后复制 gui_State = struct('gui_Name', mfilename, ...1.登录后复制 'gui_Singleton', gui_Singleton, ...1.登录后复制 'gui_OpeningFcn', @gui_OpeningFcn, ...1.登录后复制 'gui_OutputFcn', @gui_OutputFcn, ...1.登录后复制 'gui_LayoutFcn', [] , ...1.登录后复制 'gui_Callback', []);1.登录后复制 if nargin && ischar(varargin{1})1.登录后复制 gui_State.gui_Callback = str2func(varargin{1});1.登录后复制 end1.登录后复制 1.登录后复制 if nargout1.登录后复制 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});1.登录后复制 else1.登录后复制 gui_mainfcn(gui_State, varargin{:});1.登录后复制 end1.登录后复制 % End initialization code - DO NOT EDIT1.登录后复制 1.登录后复制 1.登录后复制 % --- Executes just before gui is made visible.1.登录后复制 function gui_OpeningFcn(hObject, eventdata, handles, varargin)1.登录后复制 % This function has no output args, see OutputFcn.1.登录后复制 % hObject handle to figure1.登录后复制 % eventdata reserved - to be defined in a future version of MATLAB1.登录后复制 % handles structure with handles and user data (see GUIDATA)1.登录后复制 % varargin command line arguments to gui (see VARARGIN)1.登录后复制 1.登录后复制 % Choose default command line output for gui1.登录后复制 handles.output = hObject;1.登录后复制 1.登录后复制 % Update handles structure1.登录后复制 guidata(hObject, handles);1.登录后复制 1.登录后复制 % UIWAIT makes gui wait for user response (see UIRESUME)1.登录后复制 % uiwait(handles.figure1);1.登录后复制 1.登录后复制 1.登录后复制 % --- Outputs from this function are returned to the command line.1.登录后复制 function varargout = gui_OutputFcn(hObject, eventdata, handles) 1.登录后复制 % varargout cell array for returning output args (see VARARGOUT);1.登录后复制 % hObject handle to figure1.登录后复制 % eventdata reserved - to be defined in a future version of MATLAB1.登录后复制 % handles structure with handles and user data (see GUIDATA)1.登录后复制 1.登录后复制 % Get default command line output from handles structure1.登录后复制 varargout{1} = handles.output;1.登录后复制 1.登录后复制 1.登录后复制 % --------------------------------------------------------------------1.登录后复制 function Open_Callback(hObject, eventdata, handles)1.登录后复制 [name,path]=uigetfile( ...1.登录后复制 {'*.jpg;*.tif;*.png;*.gif;*.bmp','All Image Files';...1.登录后复制 '*.*','All Files' },...1.登录后复制 '请选择要融合的低分辨率图片');1.登录后复制 fullpath=strcat(path,name);1.登录后复制 [name2,path2]=uigetfile( ...1.登录后复制 {'*.jpg;*.tif;*.png;*.gif;*.bmp','All Image Files';...1.登录后复制 '*.*','All Files' },...1.登录后复制 '请选择要融合的高分辨率图片(');1.登录后复制 fullpath2=strcat(path2,name2);1.登录后复制 save path.mat fullpath fullpath21.登录后复制 % hObject handle to Open (see GCBO)1.登录后复制 % eventdata reserved - to be defined in a future version of MATLAB1.登录后复制 % handles structure with handles and user data (see GUIDATA)1.登录后复制 1.登录后复制 1.登录后复制 % --- Executes during object creation, after setting all properties.1.登录后复制 function axes1_CreateFcn(hObject, eventdata, handles)1.登录后复制 % hObject handle to axes1 (see GCBO)1.登录后复制 % eventdata reserved - to be defined in a future version of MATLAB1.登录后复制 % handles empty - handles not created until after all CreateFcns called1.登录后复制 1.登录后复制 % Hint: place code in OpeningFcn to populate axes11.登录后复制 1.登录后复制 1.登录后复制 % --- Executes on button press in add_fu_button.1.登录后复制 function add_fu_button_Callback(hObject, eventdata, handles)1.登录后复制 axes(handles.axes1);1.登录后复制 cla;1.登录后复制 axes(handles.axes2);1.登录后复制 cla;1.登录后复制 axes(handles.axes3);1.登录后复制 cla;1.登录后复制 a=get(handles.radiobutton5,'value');1.登录后复制 b=get(handles.radiobutton6,'value');1.登录后复制 c=get(handles.radiobutton7,'value');1.登录后复制 if a==11.登录后复制 load path.mat1.登录后复制 axes(handles.axes1);1.登录后复制 low=imread(fullpath);1.登录后复制 imshow(low);1.登录后复制 axes(handles.axes2);1.登录后复制 high=imread(fullpath2);1.登录后复制 imshow(high);1.登录后复制 addfusion;1.登录后复制 load image.mat1.登录后复制 axes(handles.axes3);1.登录后复制 imshow(fusionresult);1.登录后复制 %1.登录后复制 end1.登录后复制 if b==11.登录后复制 load path.mat1.登录后复制 axes(handles.axes1);1.登录后复制 low=imread(fullpath);1.登录后复制 imshow(low);1.登录后复制 axes(handles.axes2);1.登录后复制 high=imread(fullpath2);1.登录后复制 imshow(high);1.登录后复制 sel_h_fusion;1.登录后复制 load image.mat1.登录后复制 axes(handles.axes3);1.登录后复制 imshow(fusionresult);1.登录后复制 %1.登录后复制 end1.登录后复制 if c==11.登录后复制 load path.mat1.登录后复制 axes(handles.axes1);1.登录后复制 low=imread(fullpath);1.登录后复制 imshow(low);1.登录后复制 axes(handles.axes2);1.登录后复制 high=imread(fullpath2);1.登录后复制 imshow(high);1.登录后复制 sel_l_fusion;1.登录后复制 load image.mat1.登录后复制 axes(handles.axes3);1.登录后复制 imshow(fusionresult);1.登录后复制 %1.登录后复制 end1.登录后复制 1.登录后复制 1.登录后复制 1.登录后复制 %axes(handles.axes4);1.登录后复制 %cla;1.登录后复制 %load path.mat1.登录后复制 %axes(handles.axes1);1.登录后复制 %low=imread(fullpath);1.登录后复制 %imshow(low);1.登录后复制 %axes(handles.axes2);1.登录后复制 %high=imread(fullpath2);1.登录后复制 %imshow(high);1.登录后复制 %addfusion;1.登录后复制 %load image.mat1.登录后复制 %axes(handles.axes3);1.登录后复制 1.登录后复制 %imshow(fusionresult);1.登录后复制 % hObject handle to add_fu_button (see GCBO)1.登录后复制 % eventdata reserved - to be defined in a future version of MATLAB1.登录后复制 % handles structure with handles and user data (see GUIDATA)1.登录后复制 1.登录后复制 1.登录后复制 % --- Executes on button press in pretreat_button.1.登录后复制 function pretreat_button_Callback(hObject, eventdata, handles)1.登录后复制 load path.mat1.登录后复制 axes(handles.axes4);1.登录后复制 low=imread(fullpath);1.登录后复制 imshow(low);1.登录后复制 axes(handles.axes5);1.登录后复制 high=imread(fullpath2);1.登录后复制 imshow(high);1.登录后复制 pretreat;1.登录后复制 load image.mat1.登录后复制 NbColors=255;1.登录后复制 map=gray(NbColors);1.登录后复制 axes(handles.axes6);1.登录后复制 image(pretreat_result_low);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes7);1.登录后复制 image(pretreat_result_high);1.登录后复制 colormap(map);1.登录后复制 1.登录后复制 1.登录后复制 1.登录后复制 1.登录后复制 % hObject handle to pretreat_button (see GCBO)1.登录后复制 % eventdata reserved - to be defined in a future version of MATLAB1.登录后复制 % handles structure with handles and user data (see GUIDATA)1.登录后复制 1.登录后复制 1.登录后复制 % --- Executes on button press in gauss_button1.1.登录后复制 function gauss_button1_Callback(hObject, eventdata, handles)1.登录后复制 axes(handles.axes4);1.登录后复制 cla;1.登录后复制 axes(handles.axes5);1.登录后复制 cla;1.登录后复制 axes(handles.axes6);1.登录后复制 cla;1.登录后复制 axes(handles.axes7);1.登录后复制 cla;1.登录后复制 gauss;1.登录后复制 load image.mat1.登录后复制 NbColors=255;1.登录后复制 map=gray(NbColors);1.登录后复制 axes(handles.axes4);1.登录后复制 image(g0l);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes5);1.登录后复制 image(g1l);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes6);1.登录后复制 image(g2l);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes7);1.登录后复制 image(g3l);1.登录后复制 colormap(map);1.登录后复制 1.登录后复制 % hObject handle to gauss_button1 (see GCBO)1.登录后复制 % eventdata reserved - to be defined in a future version of MATLAB1.登录后复制 % handles structure with handles and user data (see GUIDATA)1.登录后复制 1.登录后复制 1.登录后复制 % --- Executes on button press in gauss_button2.1.登录后复制 function gauss_button2_Callback(hObject, eventdata, handles)1.登录后复制 axes(handles.axes4);1.登录后复制 cla;1.登录后复制 axes(handles.axes5);1.登录后复制 cla;1.登录后复制 axes(handles.axes6);1.登录后复制 cla;1.登录后复制 axes(handles.axes7);1.登录后复制 cla;1.登录后复制 %gauss;1.登录后复制 load image.mat1.登录后复制 NbColors=255;1.登录后复制 map=gray(NbColors);1.登录后复制 axes(handles.axes4);1.登录后复制 image(g0h);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes5);1.登录后复制 image(g1h);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes6);1.登录后复制 image(g22h);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes7);1.登录后复制 image(g3h);1.登录后复制 colormap(map);1.登录后复制 1.登录后复制 % hObject handle to gauss_button2 (see GCBO)1.登录后复制 % eventdata reserved - to be defined in a future version of MATLAB1.登录后复制 % handles structure with handles and user data (see GUIDATA)1.登录后复制 1.登录后复制 1.登录后复制 % --- Executes on button press in lap_button1.1.登录后复制 function lap_button1_Callback(hObject, eventdata, handles)1.登录后复制 axes(handles.axes4);1.登录后复制 cla;1.登录后复制 axes(handles.axes5);1.登录后复制 cla;1.登录后复制 axes(handles.axes6);1.登录后复制 cla;1.登录后复制 axes(handles.axes7);1.登录后复制 cla;1.登录后复制 lap1.登录后复制 load image.mat1.登录后复制 NbColors=255;1.登录后复制 map=gray(NbColors);1.登录后复制 axes(handles.axes4);1.登录后复制 image(lp0l);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes5);1.登录后复制 image(lp1l);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes6);1.登录后复制 image(lp2l);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes7);1.登录后复制 image(lp3l);1.登录后复制 colormap(map);1.登录后复制 1.登录后复制 % hObject handle to lap_button1 (see GCBO)1.登录后复制 % eventdata reserved - to be defined in a future version of MATLAB1.登录后复制 % handles structure with handles and user data (see GUIDATA)1.登录后复制 1.登录后复制 1.登录后复制 % --- Executes on button press in lap_button2.1.登录后复制 function lap_button2_Callback(hObject, eventdata, handles)1.登录后复制 axes(handles.axes4);1.登录后复制 cla;1.登录后复制 axes(handles.axes5);1.登录后复制 cla;1.登录后复制 axes(handles.axes6);1.登录后复制 cla;1.登录后复制 axes(handles.axes7);1.登录后复制 cla;1.登录后复制 %lap1.登录后复制 load image.mat1.登录后复制 NbColors=255;1.登录后复制 map=gray(NbColors);1.登录后复制 axes(handles.axes4);1.登录后复制 image(lp0h);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes5);1.登录后复制 image(lp1h);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes6);1.登录后复制 image(lp2h);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes7);1.登录后复制 image(lp3h);1.登录后复制 colormap(map);1.登录后复制 % hObject handle to lap_button2 (see GCBO)1.登录后复制 % eventdata reserved - to be defined in a future version of MATLAB1.登录后复制 % handles structure with handles and user data (see GUIDATA)1.登录后复制 1.登录后复制 1.登录后复制 % --- Executes on button press in fu_button.1.登录后复制 function fu_button_Callback(hObject, eventdata, handles)1.登录后复制 axes(handles.axes4);1.登录后复制 cla;1.登录后复制 axes(handles.axes5);1.登录后复制 cla;1.登录后复制 axes(handles.axes6);1.登录后复制 cla;1.登录后复制 axes(handles.axes7);1.登录后复制 cla;1.登录后复制 fusion1.登录后复制 load image.mat1.登录后复制 NbColors=255;1.登录后复制 map=gray(NbColors);1.登录后复制 axes(handles.axes4);1.登录后复制 image(fu0);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes5);1.登录后复制 image(fu1);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes6);1.登录后复制 image(fu2);1.登录后复制 colormap(map);1.登录后复制 axes(handles.axes7);1.登录后复制 image(fu3);1.登录后复制 colormap(map);1.登录后复制 1.登录后复制 % hObject handle to fu_button (see GCBO)1.登录后复制 % eventdata reserved - to be defined in a future version of MATLAB1.登录后复制 % handles structure with handles and user data (see GUIDATA)1.登录后复制 1.登录后复制 1.登录后复制 % --- Executes on button press in refactory_button.1.登录后复制 function refactory_button_Callback(hObject, eventdata, handles)1.登录后复制 axes(handles.axes4);1.登录后复制 cla;1.登录后复制 axes(handles.axes5);1.登录后复制 cla;1.登录后复制 axes(handles.axes6);1.登录后复制 cla;1.登录后复制 axes(handles.axes7);1.登录后复制 cla;1.登录后复制 refactory1.登录后复制 load image.mat1.登录后复制 NbColors=255;1.登录后复制 map=gray(NbColors);1.登录后复制 axes(handles.axes4);1.登录后复制 image(output);1.登录后复制 colormap(map);1.登录后复制 % hObject handle to refactory_button (see GCBO)1.登录后复制 % eventdata reserved - to be defined in a future version of MATLAB1.登录后复制 % handles structure with handles and user data (see GUIDATA)1.3 仿真结果4 参考文献[1]李俊峰. 基于像素级的图像融合方法研究[D]. 南昌航空大学, 2008.博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。部分理论引用网络文献,若有侵权联系博主删除。