Sparse Representation Multispectral Image Fusion matlab Source

Keywords: MATLAB Algorithm Machine Learning image processing

1. Introduction to Sparse Representation

1 Sparse Representation Theory
Sparse means that most or all of the original signals are represented by a linear combination of fewer basic signals. After sparse representation, the more sparse the signal is, the more accurate the reconstructed signal will be. Set x< Rn as the signal to be processed and D< Rn*m as the dictionary, then x can be represented as:

In the formula: _ < Rm, _= (theta 1, theta 2..., theta m) is the sparsity factor;D(n_m) is an over-complete dictionary. Formula (1) can be derived from Formula (2) by adding the sparsity constraint:

Formula 0 denotes the l0 norm, which denotes the number of non-zero elements in. The exact sparse representation of Formula (2) is usually unsatisfactory and its approximation can be described as:

v < Rn is an approximation error, so equation (2) is converted to solution of equation (3).

The direct solution of the l0 norm is a NP-hard problem for which either a relaxation algorithm or a greedy algorithm can be used.
The sparse decomposition algorithm in sparse representation was first proposed by Mallat. The Matching Pursuit (MP) algorithm proposed by Mallat is simple and easy to implement, so it has been widely used. Subsequently, researchers have proposed improved algorithms based on MP algorithm, such as Orthogonal Matching Pursuit (OMP), which converges faster than MP algorithm.

2 Multispectral image fusion based on sparse representation
This paper presents a multispectral image fusion method based on sparse representation, which is implemented as follows:
Step1: The multispectral image is transformed by PCA to get the first principal component of the image.
Step2: Match the histogram with the panchromatic image and the first principal component;
Step3: The first principal component and the matched panchromatic image are divided into blocks, each image block is represented sparsely, and the sparse coefficients are fused using absolute maximization.
Step4: The fusion coefficient is reconstructed to obtain the fused multispectral image.

2. Partial Source Code

%%  The implementation of Hybrid Monte Carlo method to evaluate the joint posterior distribution
%   AUTHOR: Qi WEI, University of Toulouse,
close all;clear all;
%% Generate the data
%Sparse fusion consists three parts
%% Step 1: Learn the rough estimation
%% Step 2: Learn the dictionary
%% Step 3: Alternating optimization
%% Evaluate the fusion results: Quantitative
    ERGAS.(FusMeth),DD.(FusMeth)] = metrics(X_real,HSFusion.(FusMeth),psfY.ds_r);
fprintf('%s Performance:\n SNR: %f\n RMSE: %f\n UIQI: %f\n SAM: %f\n ERGAS: %f\n DD: %f\n Time: %f\n',...
%% Display the fusion results: Qualitive
normColor = @(R)max(min((R-mean(R(:)))/std(R(:)),2),-2)/3+0.5;
figure(114);imshow(temp_show);title('HS image')
figure(115);imshow(temp_show);title('MS image')
figure(116);imshow(temp_show);title(['Fused image-' FusMeth])
name=[mat2str(clock) FusMeth '.mat'];save(name);


3. Operation results

4. matlab Versions and References

1 matlab version

2 References
[1] Cai Limei. MATLAB Image Processing - Theory, Algorithm and Example Analysis [M]. Tsinghua University Press, 2020.
[2] Yang Dan, Zhao Haibin, Longzhe.MATLAB image processing example in detail [M]. Tsinghua University Press, 2013.
[3] Zhou Pin. MATLAB Image Processing and Graphical User Interface Design [M]. Tsinghua University Press, 2013.
[4] Liu Chenglong. Proficient in MATLAB image processing [M]. Tsinghua University Press, 2015.


Posted by hustler on Mon, 13 Sep 2021 09:56:48 -0700