【圖像融合】基于curvelet變換圖像融合matlab代碼
【圖像融合】基于curvelet變換圖像融合matlab代碼
TT_Matlab
每天分享一點(diǎn)Matlab資料,一起成長(zhǎng)進(jìn)步。需要定制程序添加qq1575304183
1 簡(jiǎn)介
針對(duì)Curvelet分解的不同頻率域,分別討論了低頻系數(shù)和高頻系數(shù)的選擇原則.在選擇低頻系數(shù)時(shí),定義了局部區(qū)域標(biāo)準(zhǔn)方差,采用了"選擇"與"平均"相結(jié)合的系數(shù)選擇方案;在選擇高頻系數(shù)時(shí),充分利用Curvelet變換具有方向性的優(yōu)點(diǎn),提出了Curvelet域方向?qū)Ρ榷鹊母拍?并給出了基于方向?qū)Ρ榷鹊南禂?shù)選擇方案.實(shí)驗(yàn)結(jié)果表明:本文所給出的融合算法能夠很好地保留多幅源圖像中的有用信息,得到多個(gè)目標(biāo)聚焦都很清晰的圖像.
2 部分代碼
clc clear all close all % fdct_wrapping_demo_recon.m -- Partial curvelet reconstruction. X = imread ( ’imgwarp.bmp’ ); X2 = imread ( ’IR1022_3.bmp’ ); X1 = rgb2gray ( X ); % Forward curvelet transform disp ( ’Take curvelet transform: fdct_wrapping’ ); tic ; C1 = fdct_wrapping ( double ( X1 ), 0 , 2 ); toc ; tic ; C2 = fdct_wrapping ( double ( X2 ), 0 , 2 ); toc ; C = C1 ; %tic; C = fdct_wrapping(double(X),0,2,5,16); toc; for s = 1 : 2 for w = 1 : length ( C { s }) C { s }{ w } = 0.5 * C1 { s }{ w } + 0.5 * C2 { s }{ w }; end end for s = 3 : length ( C ) for w = 1 : length ( C { s }) C { s }{ w } = max ( C1 { s }{ w }, C2 { s }{ w }); end end disp ( ’Take inverse curvelet transform: ifdct_wrapping’ ); tic ; Y = ifdct_wrapping ( C , 0 , 256 , 320 ); toc ; Y = uint8 ( Y ); % subplot(1,3,1); colormap gray; imagesc(real(X1)); axis(’image’); title(’VI’); % subplot(1,3,2); colormap gray; imagesc(real(X2)); axis(’image’); title(’IR’); % subplot(1,3,3); colormap gray; imagesc(real(Y)); axis(’image’); title(’fusion’); %信息熵 figure ( 1 ) subplot ( 131 ) imshow ( X1 ); title ( ’融合前圖1’ ) subplot ( 132 ) imshow ( X2 ); title ( ’融合前圖1’ ) subplot ( 133 ) imshow ( Y ); title ( ’融合后’ ) imwrite ( Y , ’xiaobo1.bmp’ ); r1 = rmse ( X1 , Y ); %融合前圖1和融合后的均方差 r2 = rmse ( X2 , Y ); %融合前圖1和融合后的均方差 disp ([ ’融合前圖1和融合后的均方差=’ , num2str ( r1 )]) disp ([ ’融合前圖2和融合后的均方差=’ , num2str ( r2 )]) xinxi1 = xinxishang ( X1 ); %融合前圖1信息熵 disp ([ ’融合前圖1的信息熵=’ , num2str ( xinxi1 )]) xinxi2 = xinxishang ( X2 ); %融合前圖2信息熵 disp ([ ’融合前圖2的信息熵=’ , num2str ( xinxi2 )]) xinxi3 = xinxishang ( Y ); %融合前圖3信息熵 disp ([ ’融合后圖的信息熵=’ , num2str ( xinxi3 )]) tidu1 = ftidu ( X1 ); % %融合前圖1梯度 disp ([ ’融合前圖1的梯度=’ , num2str ( tidu1 )]) tidu2 = ftidu ( X2 ); % %融合前圖2梯度 disp ([ ’融合前圖2的梯度=’ , num2str ( tidu2 )]) tidu3 = ftidu ( Y ); % %融合后圖梯度 disp ([ ’融合后圖的梯度=’ , num2str ( tidu3 )])
3 仿真結(jié)果
4 參考文獻(xiàn)
[1]李暉暉, 郭雷, and 劉航. "基于二代curvelet變換的圖像融合研究." 光學(xué)學(xué)報(bào) 26.5(2006):6.
微信掃一掃贊賞作者
贊賞
發(fā)送給作者
人贊賞
長(zhǎng)按二維碼向我轉(zhuǎn)賬
受蘋果公司新規(guī)定影響,微信 iOS 版的贊賞功能被關(guān)閉,可通過(guò)二維碼轉(zhuǎn)賬支持公眾號(hào)。
-
Origin(Pro):學(xué)習(xí)版的窗口限制【數(shù)據(jù)繪圖】 2020-08-07
-
如何卸載Aspen Plus并再重新安裝,這篇文章告訴你! 2020-05-29
-
CAD視口的邊框線看不到也選不中是怎么回事,怎么解決? 2020-06-04
-
教程 | Origin從DSC計(jì)算焓和比熱容 2020-08-31
-
CAD外部參照無(wú)法綁定怎么辦? 2020-06-03
-
CAD中如何將布局連帶視口中的內(nèi)容復(fù)制到另一張圖中? 2020-07-03
