当前位置:网站首页>【图像融合】基于加权和金字塔实现图像融合附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代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
边栏推荐
- 【MySQL系列】MySQL索引事务
- When using DocumentFragments add a large number of elements
- 12306抢票,极限并发带来的思考?
- 计算由两点定义的线的角度
- cdh的hue上oozie启动报错,Cannot allocate containers as requested resource is greater than maximum allowed
- Loading configuration of Nacos configuration center
- 如何更好的理解的和做好工作?
- 数据机构---第五章树与二叉树---二叉树的概念---应用题
- What can be done to make this SQL into a dangerous SQL?
- 访问控制台中的选定节点
猜你喜欢
Flink学习第三天——一文带你了解什么是Flink流?
【MySQL系列】MySQL数据库基础
drf生成序列化类代码
2022第六届强网杯部分wp
A brief analysis of mobile APP security testing in software testing, shared by a third-party software testing agency in Beijing
C language - branch statement and loop statement
chrome复制一张图片的base64数据
UI自动化测试框架搭建-标记性能较差用例
@Resource和@Autowired的区别
如何进行数据库备份
随机推荐
Dynamic Scene Deblurring with Parameter Selective Sharing and Nested Skip Connections
6134. 找到离给定两个节点最近的节点-力扣双百代码
A brief analysis of mobile APP security testing in software testing, shared by a third-party software testing agency in Beijing
深度学习基础-基于Numpy的循环神经网络(RNN)实现和反向传播训练
Flink学习第三天——一文带你了解什么是Flink流?
@Scheduled注解详解
drf生成序列化类代码
经典文献阅读之--DLO
cdh的hue上oozie启动报错,Cannot allocate containers as requested resource is greater than maximum allowed
检查 Oracle 版本的 7 种方法
How to better understand and do a good job?
[Camp Experience Post] 2022 Cybersecurity Summer Camp
numpy.isclose
Getting started with IDEA is enough to read this article
Chapter 11 Working with Dates and Times
20220725资料更新
使用Jenkins做持续集成,这个知识点必须要掌握
软件测试之移动APP安全测试简析,北京第三方软件检测机构分享
6133. 分组的最大数量
With a monthly salary of 12K, the butterfly changed to a new one and moved forward bravely - she doubled her monthly salary through the career change test~