当前位置:网站首页>Image fusion based on weighted 】 and pyramid image fusion with matlab code
Image fusion based on weighted 】 and pyramid image fusion with matlab code
2022-08-02 01:33:00 【Matlab research studio】
1 Introduction
Based on the powerful image processing toolbox function of Matlab, the images are fused by the weighted average method, the Laplace pyramid transform method and the wavelet transform method, and then the quality of the fusion results is evaluated by the corresponding evaluation indicators in the objective evaluation method.Evaluation.Experiments show that the wavelet transform method has the best image fusion effect.
2 Emulation code
close all
clear
imga = im2double(imread('apple1.jpg'));
imgb = im2double(imread('orange1.jpg')); % size(imga) = size(imgb)
imga = imresize(imga,[size(imgb,1) size(imgb,2)]);
[M N ~] = size(imga);
v = 230;
level = 5;
limga = genPyr(imga,'lap',level); % the Laplacian pyramid
limgb = genPyr(imgb,'lap',level);
maska = zeros(size(imga));
maska(:,1:v,:) = 1;
maskb = 1-maska;
blurh = fspecial('gauss',30,15); % feather the border
maska = imfilter(maska,blurh,'replicate');
maskb = imfilter(maskb,blurh,'replicate');
limgo = cell(1,level); % the blended pyramid
for p = 1:level
[Mp Np ~] = size(limga{p});
maskap = imresize(maska,[Mp Np]);
maskbp =imresize(maskb,[Mp Np]);
limgo{p} = limga{p}.*maskap + limgb{p}.*maskbp;
end
imgo = pyrReconstruct(limgo);
figure,subplot(221),imshow(imga);title('Figure 1')
subplot(222),imshow(imgb);title('Figure 2') % blend by pyramid
subplot(223),imshow(imgo);title('Pyramid fusion')
imgo1 = maska.*imga+maskb.*imgb;
subplot(224),imshow(imgo1);title('weighted fusion')
3 Run Results
4 References
[1]Qiu Haiquan, Pan Li, Pan Hua. Matlab Implementation and Comparison of Image Fusion Algorithm[J]. Journal of Yibin University, 2011(12):3.
[2] Gao Ting, Xu Yu, Xu Tingxin, et al. Pyramid image fusion algorithm based on preprocessing [J]. Journal of Air Force Early Warning Academy, 2013, 27(5):5.
Blogger profile: He is good at Matlab simulation in various fields such as intelligent optimization algorithm, neural network prediction, signal processing, cellular automata, image processing, path planning, UAV, etc. Related matlab code questions can be communicated privately.
Some theories refer to online literature. If there is any infringement, contact the blogger to delete it.
边栏推荐
猜你喜欢
随机推荐
Test Cases: Four-Step Test Design Approach
PowerBI商学院佐罗BI真经连续剧
管理基础知识18
23.卷积神经网络实战-ResNet
冒泡排序函数封装
Flex layout in detail
DOA从一维阵列传感说起
dbeaver连接MySQL数据库及错误Connection refusedconnect处理
pcie inbound和outbound关系
TKU记一次单点QPS优化(顺祝ITEYE终于回来了)
About MySQL data insertion (advanced usage)
严格模式,use strict
理解分布式系统中的缓存架构(下)
go版本升级
管理基础知识10
html+css+php+mysql实现注册+登录+修改密码(附完整代码)
YGG 公会发展计划第 1 季总结
期货开户手续费的秘密成了透明
哪里有期货开户的正规途径?
牛顿定理和相关推论