# [image fusion] Laplacian pyramid + wavelet transform image fusion based on matlab GUI [including Matlab source code 857]

Posted by Luvac Zantor on Fri, 18 Feb 2022 17:07:12 +0100

## 1, Introduction

In 1974, the French engineer J.Morlet first proposed the concept of wavelet transform. In 1986, the famous mathematician Y.Meyer accidentally constructed a real wavelet base and established the multi-scale analysis of constructing wavelet base in cooperation with S.Mallat. Wavelet analysis began to flourish. Wavelet analysis has a wide range of applications. In mathematics, it has been used in numerical analysis, construction of fast numerical methods, construction of curves and surfaces, solution of differential equations, cybernetics and so on. Filtering, denoising, compression and transmission in signal analysis. In image processing, image compression, classification, recognition and diagnosis, denoising and so on. This chapter will focus on the application of wavelet in image analysis.
1 principle of wavelet transform
Wavelet analysis is a difficult branch. Users can realize image compression, decomposition and reconstruction of vibration signals by using wavelet transform. Therefore, it is widely used in practical engineering. Compared with Fourier transform, wavelet transform is a local transform in spatial domain and frequency domain, so it can effectively extract information from signals. Wavelet transform realizes multi-scale decomposition and reconstruction of signals through basic operations such as scaling and translation, which solves many problems brought by Fourier transform to a great extent.
As a new branch of mathematics, wavelet analysis is the perfect crystallization of functional analysis, Fourier analysis and numerical analysis; Wavelet analysis is also a new technology of "time-scale" analysis and multi-resolution analysis. It is widely used in signal analysis, speech synthesis, image compression and recognition, atmospheric and ocean wave analysis and so on.
(1) Wavelet analysis is used for signal and image compression. Wavelet compression is characterized by high compression ratio and fast compression speed. After compression, it can keep the characteristics of signal and image unchanged, and can resist interference in transmission. There are many compression methods based on wavelet analysis, including wavelet compression, wavelet packet compression, wavelet transform vector compression and so on.
(2) Wavelet can also be used for signal filtering and denoising, signal time-frequency analysis, signal-to-noise separation and extraction of weak signals, fractal index, signal recognition and diagnosis, multi-scale edge detection and so on.
(3) The applications of wavelet analysis in engineering technology include computer vision, curve design, turbulence, remote universe research and biomedicine.
2 multiscale analysis

3 image decomposition and quantization

4 image compression coding

5 image coding evaluation

## 2, Source code

```function varargout = imageprocess(varargin)
% IMAGEPROCESS MATLAB code for imageprocess.fig
%      IMAGEPROCESS, by itself, creates a new IMAGEPROCESS or raises the existing
%      singleton*.
%
%      H = IMAGEPROCESS returns the handle to a new IMAGEPROCESS or the handle to
%      the existing singleton*.
%
%      IMAGEPROCESS('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in IMAGEPROCESS.M with the given input arguments.
%
%      IMAGEPROCESS('Property','Value',...) creates a new IMAGEPROCESS or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before imageprocess_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to imageprocess_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%

% Edit the above text to modify the response to help imageprocess

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
'gui_Singleton',  gui_Singleton, ...
'gui_OpeningFcn', @imageprocess_OpeningFcn, ...
'gui_OutputFcn',  @imageprocess_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 imageprocess is made visible.
function imageprocess_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 imageprocess (see VARARGIN)

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

% Update handles structure
guidata(hObject, handles);

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

% --- Outputs from this function are returned to the command line.
function varargout = imageprocess_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)

global im1
[filename, pathname]=uigetfile({'*.*';'*.bmp';'*.jpg';'*.tif';'*.jpg';'*.png'},'Open picture');
str1=[pathname filename];
axes(handles.axes1);
imshow(im1);

% --- 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)
global im2
[filename, pathname]=uigetfile({'*.*';'*.bmp';'*.jpg';'*.tif';'*.jpg';'*.png'},'Open picture');
str1=[pathname filename];
axes(handles.axes2);
imshow(im2);

% --- Executes on button press in pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton7 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
close(gcf);

% --- Executes during object creation, after setting all properties.
function axes3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to axes3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: place code in OpeningFcn to populate axes3

% --- Executes on button press in pushbutton3.
function pushbutton11_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)

% --- Executes when selected object is changed in uipanel2.

% --- Executes when selected object is changed in uipanel3.
function uipanel3_SelectionChangeFcn(hObject, eventdata, handles)
% hObject    handle to the selected object in uipanel3
% eventdata  structure with the following fields (see UIBUTTONGROUP)
%	EventName: string 'SelectionChanged' (read only)
%	OldValue: handle of the previously selected object or empty if none was selected
%	NewValue: handle of the currently selected object
% handles    structure with handles and user data (see GUIDATA)

% --------------------------------------------------------------------
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_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)

% --------------------------------------------------------------------
function Untitled_13_Callback(hObject, eventdata, handles)
% hObject    handle to Untitled_13 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% --------------------------------------------------------------------
function Untitled_27_Callback(hObject, eventdata, handles)
% hObject    handle to Untitled_27 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% --------------------------------------------------------------------
function Untitled_28_Callback(hObject, eventdata, handles)
% hObject    handle to Untitled_28 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global im1
global im2
im11 = double(im1)/255;
im22 = double(im2)/255;

mp = 3;zt =4; cf =1;ar = 1; cc = [cf ar];
Y_lap = fuse_lap(im11,im22,zt,cc,mp);

axes(handles.axes4);
imshow(Y_lap);

% --------------------------------------------------------------------
function Untitled_29_Callback(hObject, eventdata, handles)
% hObject    handle to Untitled_29 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% --------------------------------------------------------------------
function Untitled_14_Callback(hObject, eventdata, handles)
% hObject    handle to Untitled_14 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
im=handles.img;
se=strel('disk',4);
im3=imerode(im,se);
axes(handles.axes3);
imshow(im3);
handles.img=im3;
guidata(hObject,handles);
```

## 4, Remarks

Complete code or write on behalf of QQ 1564658423

Topics: MATLAB image processing