当前位置:网站首页>【图像融合】基于加权和金字塔实现图像融合附matlab代码
【图像融合】基于加权和金字塔实现图像融合附matlab代码
2022-08-01 23:45:00 【matlab_dingdang】
1 内容介绍
基于Matlab强大的图像处理工具箱函数,用加权平均法、拉普拉斯金字塔变换法、小波变换法对图像进行融合,然后用客观评价法中的相应评价指标对其融合结果进行质量评价。实验表明,小波变换法的图像融合效果最好。
2 仿真代码
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('图1')
subplot(222),imshow(imgb);title('图2') % blend by pyramid
subplot(223),imshow(imgo);title('金字塔融合')
imgo1 = maska.*imga+maskb.*imgb;
subplot(224),imshow(imgo1);title('加权融合')
3 运行结果
4 参考文献
[1]仇海全, 潘丽, 潘花. 图像融合算法的Matlab实现与比较[J]. 宜宾学院学报, 2011(12):3.
[2]高婷, 徐毓, 徐廷新,等. 基于预处理的金字塔图像融合算法[J]. 空军预警学院学报, 2013, 27(5):5.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
边栏推荐
猜你喜欢
Quartus uses tcl files to quickly configure pins
数据机构---第五章树与二叉树---二叉树的概念---应用题
Access the selected node in the console
6134. 找到离给定两个节点最近的节点-力扣双百代码
Deep Learning Fundamentals - Numpy-based Recurrent Neural Network (RNN) implementation and backpropagation training
论文理解【RL - Exp Replay】—— Experience Replay with Likelihood-free Importance Weights
请问什么是 CICD
A brief analysis of mobile APP security testing in software testing, shared by a third-party software testing agency in Beijing
cdh6 opens oozieWeb page, Oozie web console is disabled.
ICLR 2022 Best Paper: Partial Label Learning Based on Contrastive Disambiguation
随机推荐
Convert LocalDateTime to Date type
Check if point is inside rectangle
Quartus uses tcl files to quickly configure pins
Getting started with IDEA is enough to read this article
ELK日志采集
Secondary Vocational Network Security Competition B7 Competition Deployment Process
字节跳动面试官:请你实现一个大文件上传和断点续传
A brief analysis of mobile APP security testing in software testing, shared by a third-party software testing agency in Beijing
An interview question about iota in golang
程序员如何优雅地解决线上问题?
月薪12K,蝶变向新,勇往直前—她通过转行测试实现月薪翻倍~
Avoid hidden text when loading fonts
Additional Features for Scripting
一道golang中关于iota的面试题
DRF generating serialization class code
@Transactional注解在类上还是接口上使用,哪种方式更好?
Leetcode 129求根节点到叶节点数字之和、104二叉树的最大深度、8字符串转换整数(atoi)、82删除排序链表中的重复元素II、204二分查找、94二叉树的中序遍历、144二叉树的前序遍历
JAX-based activation function, softmax function and cross entropy function
论文理解【RL - Exp Replay】—— Experience Replay with Likelihood-free Importance Weights
Bean的生命周期