当前位置:网站首页>【图像融合】基于加权和金字塔实现图像融合附matlab代码
【图像融合】基于加权和金字塔实现图像融合附matlab代码
2022-08-01 23:45:00 【matlab_dingdang】
1 内容介绍
基于Matlab强大的图像处理工具箱函数,用加权平均法、拉普拉斯金字塔变换法、小波变换法对图像进行融合,然后用客观评价法中的相应评价指标对其融合结果进行质量评价。实验表明,小波变换法的图像融合效果最好。


2 仿真代码
close allclearimga = 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 pyramidlimgb = genPyr(imgb,'lap',level);maska = zeros(size(imga));maska(:,1:v,:) = 1;maskb = 1-maska;blurh = fspecial('gauss',30,15); % feather the bordermaska = imfilter(maska,blurh,'replicate');maskb = imfilter(maskb,blurh,'replicate');limgo = cell(1,level); % the blended pyramidfor 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;endimgo = pyrReconstruct(limgo);figure,subplot(221),imshow(imga);title('图1')subplot(222),imshow(imgb);title('图2') % blend by pyramidsubplot(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代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
边栏推荐
- ELK日志采集
- 【MySQL系列】MySQL索引事务
- Thesis understanding [RL - Exp Replay] - Experience Replay with Likelihood-free Importance Weights
- yay 报错 response decoding failed: invalid character ‘<‘ looking for beginning of value;
- Getting started with IDEA is enough to read this article
- 企业防护墙管理,有什么防火墙管理工具?
- oozie startup error on cdh's hue, Cannot allocate containers as requested resource is greater than maximum allowed
- 请问什么是 CICD
- 正则表达式
- 一款简洁的文件传输工具
猜你喜欢
随机推荐
YOLO等目标检测模型的非极大值抑制NMS和评价指标(Acc, Precision, Recall, AP, mAP, RoI)、YOLOv5中[email protected]与
颜色透明参数
软技能之UML图
What is CICD excuse me
Is TCP reliable?Why?
根本上解决mysql启动失败问题Job for mysqld.service failed because the control process exited with error code
6134. 找到离给定两个节点最近的节点-力扣双百代码
Calculate the distance between two points
6132. 使数组中所有元素都等于零-快速排序法
Quartus 使用 tcl 文件快速配置管脚
qt-faststart installation and use
@Scheduled注解详解
Flink学习第五天——Flink可视化控制台依赖配置和界面介绍
Special characters & escapes in bat
字节跳动面试官:请你实现一个大文件上传和断点续传
chrome copies the base64 data of an image
添加大量元素时使用 DocumentFragments
辛普森悖论
drf生成序列化类代码
numpy.isclose









