基于matlab對(duì)比度和結(jié)構(gòu)提取的多模態(tài)解剖圖像融合實(shí)現(xiàn)
一、圖像融合簡(jiǎn)介
應(yīng)用多模態(tài)圖像的配準(zhǔn)與融合技術(shù),可以把不同狀態(tài)的醫(yī)學(xué)圖像有機(jī)地結(jié)合起來(lái),為臨床診斷和治療提供更豐富的信息。介紹了多模態(tài)醫(yī)學(xué)圖像配準(zhǔn)與融合的概念、方法及意義。最后簡(jiǎn)單介紹了小波變換分析方法。
二、部分源代碼
clear; close all; clc; warning off
%% A Novel Multi-Modality Anatomical Image FusionMethod Based on Contrast and Structure Extraction
% F = fuseImage(I,scale)
%Inputs:
%I - a mulyi-modal anatomical image sequence
%scale - scale factor of dense SIFT, the default value is 16
%% load images from the folder that contain multi-modal image to be fused
%I=load_images('./Dataset\CT-MRI\Pair 1');
I=load_images('./Dataset\MR-T1-MR-T2\Pair 1');
%I=load_images('./Dataset\MR-Gad-MR-T1\Pair 1');
% Show source input images
figure;
no_of_images = size(I,4);
for i = 1:no_of_images
subplot(2,1,i); imshow(I(:,:,:,i));
end
suptitle('Source Images');
%%
F=fuseImage(I,16);
%% Output: F - the fused image
F=rgb2gray(F);
figure;
imshow(F);
function [ F ] = fuseImage(I,scale)
addpath('Pyramid_Decomposition');
addpath('Guided_Filter');
addpath('Dense_SIFT');
tic
%%
[H, W, C, N]=size(I);
imgs=im2double(I);
IA=zeros(H,W,C,N);
for i=1:N
IA(:,:,:,i)=enhnc(imgs(:,:,:,i));
end
%%
imgs_gray=zeros(H,W,N);
for i=1:N
imgs_gray(:,:,i)=rgb2gray(IA(:,:,:,i));
end
%
% %dense sift calculation
dsifts=zeros(H,W,32,N, 'single');
for i=1:N
img=imgs_gray(:,:,i);
ext_img=img_extend(img,scale/2-1);
[dsifts(:,:,:,i)] = DenseSIFT(ext_img, scale, 1);
end
%%
%local contrast
contrast_map=zeros(H,W,N);
for i=1:N
contrast_map(:,:,i)=sum(dsifts(:,:,:,i),3);
end
%winner-take-all weighted average strategy for local contrast
[x, labels]=max(contrast_map,[],3);
clear x;
for i=1:N
mono=zeros(H,W);
mono(labels==i)=1;
contrast_map(:,:,i)=mono;
end
%% Structure
h = [1 -1];
structure_map=zeros(H,W,N);
for i=1:N
structure_map(:,:,i) = abs(conv2(imgs_gray(:,:,i),h,'same')) + abs(conv2(imgs_gray(:,:,i),h','same')); %EQ 13
end
%winner-take-all weighted average strategy for structure
[a, label]=max(structure_map,[],3);
clear x;
for i=1:N
monoo=zeros(H,W);
monoo(label==i)=1;
structure_map(:,:,i)=monoo;
end
%%
weight_map=structure_map.*contrast_map;
%weight map refinement using Guided Filter
for i=1:N
weight_map(:,:,i) = fastGF(weight_map(:,:,i),12,0.25,2.5);
end
% normalizing weight maps
%
weight_map = weight_map + 10^-25; %avoids division by zero
weight_map = weight_map./repmat(sum(weight_map,3),[1 1 N]);
%% Pyramid Decomposition
% create empty pyramid
pyr = gaussian_pyramid(zeros(H,W,3));
nlev = length(pyr);
% multiresolution blending
for i = 1:N
% construct pyramid from each input image
% blend
for b = 1:nlev
w = repmat(pyrW,[1 1 3]);
pyr = pyr + w .*pyrI;
end
end
% reconstruct
F = reconstruct_laplacian_pyramid(pyr);
toc
end
三、運(yùn)行結(jié)果


四、matlab版本
matlab版本
2014a
以上就是基于matlab對(duì)比度和結(jié)構(gòu)提取的多模態(tài)解剖圖像融合實(shí)現(xiàn)的詳細(xì)內(nèi)容,更多關(guān)于matlab? 多模態(tài)解剖圖像融合的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!
相關(guān)文章
C++ 數(shù)據(jù)結(jié)構(gòu)之對(duì)稱矩陣及稀疏矩陣的壓縮存儲(chǔ)
這篇文章主要介紹了C++ 數(shù)據(jù)結(jié)構(gòu)之對(duì)稱矩陣及稀疏矩陣的壓縮存儲(chǔ)的相關(guān)資料,這里實(shí)現(xiàn)稀疏矩陣和對(duì)稱矩陣的壓縮存儲(chǔ)的實(shí)例,需要的朋友可以參考下2017-08-08
c語(yǔ)言實(shí)現(xiàn)學(xué)生管理系統(tǒng)詳解
這篇文章主要為大家介紹了c語(yǔ)言實(shí)現(xiàn)學(xué)生管理系統(tǒng),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下,希望能夠給你帶來(lái)幫助<BR>2021-12-12
C++11右值引用和轉(zhuǎn)發(fā)型引用教程詳解
這篇文章主要介紹了C++11右值引用和轉(zhuǎn)發(fā)型引用教程詳解,需要的朋友可以參考下2018-03-03
C++基礎(chǔ)學(xué)習(xí)之函數(shù)重載的簡(jiǎn)單介紹
函數(shù)重載是一種特殊情況,C++允許在同一作用域中聲明幾個(gè)類似的同名函數(shù),這些同名函數(shù)的形參列表(參數(shù)個(gè)數(shù),類型,順序)必須不同,常用來(lái)處理實(shí)現(xiàn)功能類似數(shù)據(jù)類型不同的問(wèn)題。這篇文章主要給大家介紹了關(guān)于C++基礎(chǔ)學(xué)習(xí)之函數(shù)重載的相關(guān)資料,需要的朋友可以參考下2019-01-01
C++11智能指針unique_ptr用法使用場(chǎng)景分析
unique_ptr 是 C++ 11 提供的用于防止內(nèi)存泄漏的智能指針中的一種實(shí)現(xiàn),即使在異常發(fā)生時(shí)也可幫助避免資源泄露。這篇文章主要介紹了C++11智能指針unique_ptr用法介紹,需要的朋友可以參考下2021-08-08

