找回密码
 注册
关于网站域名变更的通知
查看: 574|回复: 1
打印 上一主题 下一主题

基于matlab CBF算法之图像融合

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2021-4-28 11:02 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x
: [. n+ d0 \( @4 R
一、源代码+ t" S( ]" g/ }
) H. A8 j- {' X
  • close all;
  • clear all;
  • clc;
  • %%% Fusion Method Parameters.
  • cov_wsize=5;
  • %%% Bilateral Filter Parameters.
  • sigmas=1.8;  %%% Spatial (Geometric) Sigma. 1.8
  • sigmar=25; %%% Range (Photometric/Radiometric) Sigma.25 256/10
  • ksize=11;   %%% Kernal Size  (should be odd).
  • arr=['A';'B'];
  • for m=1:2
  •    string=arr(m);
  • %    inp_image=strcat('images\med256',string,'.jpg');
  •    inp_image=strcat('images\office256',string,'.tif');
  • %    inp_image=strcat('images\gun',string,'.gif');
  •    x{m}=imread(inp_image);
  •    if(size(x{m},3)==3)
  •       x{m}=rgb2gray(x{m});
  •    end
  • end
  • [M,N]=size(x{m});
  • %%% Cross Bilateral Filter.
  • tic
  • cbf_out{1}=cross_bilateral_filt2Df(x{1},x{2},sigmas,sigmar,ksize);
  • detail{1}=double(x{1})-cbf_out{1};
  • cbf_out{2}= cross_bilateral_filt2Df(x{2},x{1},sigmas,sigmar,ksize);
  • detail{2}=double(x{2})-cbf_out{2};
  • %%% Fusion Rule (IEEE Conf 2011).
  • xfused=cbf_ieeeconf2011f(x,detail,cov_wsize);
  • toc
  • xfused8=uint8(xfused);
  • if(strncmp(inp_image,'gun',3))
  •    figure,imagesc(x{1}),colormap gray
  •    figure,imagesc(x{2}),colormap gray
  •    figure,imagesc(xfused8),colormap gray
  • else
  •    figure,subplot(131);imshow(x{1});title('图1')
  •   subplot(132);imshow(x{2});title('图2')
  •   subplot(133),imshow(xfused8)  ;title('融合后')
  • end
  • % axis([140 239 70 169]) %%% Office.
  • fusion_peRForm_fn(xfused8,x);

  • " Y& X; d' r; y; t) ^/ n7 D
            
& Y" }% U! m1 ?* C$ m; k) o: H
* n" v" r2 G+ D二、运行结果* Q1 {, u5 C- N+ `* P2 q; a" Z

/ `4 w% P, E! t- Y) e/ ^; {& V

该用户从未签到

2#
发表于 2021-4-28 13:11 | 只看该作者
基于matlab CBF算法之图像融合
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

推荐内容上一条 /1 下一条

EDA365公众号

关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

GMT+8, 2025-6-14 19:45 , Processed in 0.093750 second(s), 26 queries , Gzip On.

深圳市墨知创新科技有限公司

地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

快速回复 返回顶部 返回列表