function varargout = MainForm(varargin)
% MAINFORM MATLAB code for MainForm.fig
% MAINFORM, by itself, creates a new MAINFORM or raises the existing
% singleton*.
%
% H = MAINFORM returns the handle to a new MAINFORM or the handle to
% the existing singleton*.
%
% MAINFORM('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in MAINFORM.M with the given input arguments.
%
% MAINFORM('Property','Value',...) creates a new MAINFORM or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before MainForm_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to MainForm_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 MainForm
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @MainForm_OpeningFcn, ...
'gui_OutputFcn', @MainForm_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 MainForm is made visible.
function MainForm_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 MainForm (see VARARGIN)
% Choose default command line output for MainForm
handles.output = hObject;
clc;
axes(handles.axes1); cla reset; box on; set(gca, 'XTickLabel', '', 'YTickLabel', '');
axes(handles.axes2); cla reset; box on; set(gca, 'XTickLabel', '', 'YTickLabel', '');
axes(handles.axes3); cla reset; box on; set(gca, 'XTickLabel', '', 'YTickLabel', '');
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes MainForm wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = MainForm_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;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clc;
axes(handles.axes1); cla reset; box on; set(gca, 'XTickLabel', '', 'YTickLabel', '');
axes(handles.axes2); cla reset; box on; set(gca, 'XTickLabel', '', 'YTickLabel', '');
axes(handles.axes3); cla reset; box on; set(gca, 'XTickLabel', '', 'YTickLabel', '');
handles.file1 = [];
handles.file2 = [];
handles.result = [];
[filename, pathname] = uigetfile({'*.jpg;*.tif;*.png;*.gif', 'All Image Files';...
'*.*', 'All Files' }, '选择图像1', ...
fullfile(pwd, 'images\\实验图像1\\a.tif'));
if isequal(filename, 0)
return;
end
handles.file1 = fullfile(pathname, filename);
guidata(hObject, handles);
Img1 = imread(fullfile(pathname, filename));
axes(handles.axes1);
imshow(Img1, []);
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[filename, pathname] = uigetfile({'*.jpg;*.tif;*.png;*.gif', 'All Image Files';...
'*.*', 'All Files' }, '选择图像2', ...
fullfile(pwd, 'images\\实验图像1\\b.tif'));
if isequal(filename, 0)
return;
end
handles.file2 = fullfile(pathname, filename);
guidata(hObject, handles);
Img2 = imread(fullfile(pathname, filename));
axes(handles.axes2);
imshow(Img2, []);
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if isempty(handles.file1)
msgbox('请载入图像1!', '提示信息', 'modal');
return;
end
if isempty(handles.file2)
msgbox('请载入图像2!', '提示信息', 'modal');
return;
end
[imA, map1] = imread(handles.file1);
[imB, map2] = imread(handles.file2);
M1 = double(imA) / 256;
M2 = double(imB) / 256;
zt = 2;
wtype = 'haar';
[c0, s0] = Wave_Decompose(M1, zt, wtype);
[c1, s1] = Wave_Decompose(M2, zt, wtype);
Coef_Fusion = Fuse_Process(c0, c1, s0, s1);
Y = Wave_Reconstruct(Coef_Fusion, s0, wtype);
handles.result = im2uint8(mat2gray(Y));
guidata(hObject, handles);
msgbox('小波融合处理完毕!', '提示信息', 'modal');
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if isempty(handles.result)
msgbox('请进行填充处理!', '提示信息', 'modal');
return;
end
axes(handles.axes3);
imshow(handles.result, []);
没有合适的资源?快使用搜索试试~ 我知道了~
基于Matlab小波技术实现图像融合系统(程序+图片).rar
共9个文件
tif:4个
m:4个
fig:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 20 浏览量
2023-04-11
21:19:12
上传
评论
收藏 1.53MB RAR 举报
温馨提示
1、资源内容:基于Matlab小波技术实现图像融合系统(程序+图片).rar 2、适用人群:计算机,电子信息工程、数学等专业的学习者,作为“参考资料”参考学习使用。 3、解压说明:本资源需要电脑端使用WinRAR、7zip等解压工具进行解压,没有解压工具的自行百度下载即可。 4、免责声明:本资源作为“参考资料”而不是“定制需求”,代码只能作为参考,不能完全复制照搬。不一定能够满足所有人的需求,需要有一定的基础能够看懂代码,能够自行调试代码并解决报错,能够自行添加功能修改代码。由于作者大厂工作较忙,不提供答疑服务,如不存在资源缺失问题概不负责,谢谢理解。
资源推荐
资源详情
资源评论
收起资源包目录
基于Matlab小波技术实现图像融合系统(程序+图片).rar (9个子文件)
基于Matlab小波技术实现图像融合系统(程序+图片)
MainForm.fig 9KB
Wave_Reconstruct.m 135B
MainForm.m 6KB
Wave_Decompose.m 160B
Fuse_Process.m 363B
images
实验图像1
b.tif 857KB
a.tif 1.56MB
实验图像2
b.tif 258KB
a.tif 258KB
共 9 条
- 1
资源评论
Matlab仿真实验室
- 粉丝: 3w+
- 资源: 2410
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 全唐诗维护用Delphi操作SQLite数据库正则表达式提取诗句
- 源代码来自 Atlas,这是我们与澳门出口公司在 2019 年修订版中展示的 64k 演示.zip
- 大学生职业生涯规划书 (1).pptx
- 游戏恶魔城 DirectX - Nhập môn phát triển 游戏.zip
- 基于MATLAB的车牌识别实现车牌定位系统【GUI带界面】.zip
- <数据集>路面坑洼识别数据集<目标检测>
- 基于MATLAB的车牌识别实现车牌定位技术实现【带界面GUI】.zip
- 游戏引擎支持 DirectX 11.zip
- 基于MATLAB的车牌识别实现车牌定位代码【带界面GUI】.zip
- 基于SpringBoot+Vue的农产品直卖平台(前端代码)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功