✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
更多Matlab仿真内容点击👇
⛄ 内容介绍
在地球科学领域,变形矢量场反演是一项重要的研究课题。它可以帮助我们理解地球内部的构造和过程,以及地壳运动的机制。然而,由于地球系统的复杂性和观测数据的不完整性,变形矢量场的反演一直是一个具有挑战性的问题。
近年来,自适应双残差反馈控制变形矢量场迭代反演方法逐渐引起了研究者的关注。这种方法通过将模型参数的更新过程转化为一个优化问题,以最小化观测数据与模拟数据之间的残差,从而实现对变形矢量场的高精度反演。
自适应双残差反馈控制方法的核心思想是在每次迭代过程中,根据当前的模型参数和观测数据,计算出模拟数据,并将其与观测数据进行比较。通过计算两者之间的残差,可以评估当前模型参数的拟合程度。然后,根据残差的大小调整模型参数,并再次进行迭代。这种反复迭代的过程可以逐步提高模型参数的拟合能力,从而得到更准确的变形矢量场。
与传统的反演方法相比,自适应双残差反馈控制方法具有以下优势:
-
高精度:通过不断调整模型参数,该方法可以逐步提高模型的拟合能力,从而实现对变形矢量场的高精度反演。
-
自适应性:该方法可以根据每次迭代的结果自适应地调整模型参数,以适应不同的地质结构和观测数据。
-
收敛性:由于每次迭代都是基于残差的大小进行调整,该方法具有较好的收敛性,可以快速得到稳定的反演结果。
尽管自适应双残差反馈控制方法在变形矢量场反演中表现出良好的性能,但仍然存在一些挑战和局限性。首先,该方法对初始模型参数的选择较为敏感,不同的初始参数可能导致不同的反演结果。其次,该方法的计算复杂度较高,需要进行大量的迭代计算,因此在实际应用中可能存在一定的计算资源限制。
为了进一步提高自适应双残差反馈控制方法的效果,可以考虑以下几个方面的改进:
-
初始模型参数的选择:可以通过引入先验信息或利用其他地球物理数据来选择更合理的初始模型参数,以减小反演结果的不确定性。
-
并行计算技术的应用:可以利用并行计算技术来加速反演过程,提高计算效率。
-
多源数据的融合:可以将不同类型的观测数据进行融合,以提高反演结果的可靠性和精度。
总之,基于自适应双残差反馈控制的变形矢量场迭代反演方法是一种有效的地球科学研究工具。它可以帮助我们更好地理解地球内部的构造和过程,并为地球科学领域的其他研究提供有力支持。随着计算能力和观测技术的不断进步,相信这种方法在未来将发挥更大的作用,并取得更加令人瞩目的成果。
⛄ 部分代码
% demo_inversion_2d.m
%
% 2D DVF inversion [1,2] demo script.
%
% ----------------------------------------------------------------------
%
% Copyright (C) 2018, Department of Computer Science, Duke University
%
% This program is free software: you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by the
% Free Software Foundation, either version 3 of the License, or (at your
% option) any later version.
%
% This program is distributed in the hope that it will be useful, but
% WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
% Public License for more details.
%
% You should have received a copy of the GNU General Public License along
% with this program. If not, see <https://www.gnu.org/licenses/>.
%
% ----------------------------------------------------------------------
%
% REFERENCES
%
% [1] A. Dubey*, A.-S. Iliopoulos*, X. Sun, F.-F. Yin, and L. Ren,
% "Iterative inversion of deformation vector fields with feedback
% control," Medical Physics, vol. 45, no. 7, pp. 3147-3160, 2018.
% - DOI: 10.1002/mp.12962
% - arXiv: 1610.08589 [cs.CV]
%
% [2] A. Dubey, "Symmetric completion of deformable registration via
% bi-residual inversion," PhD thesis, Duke University, Durham, NC, USA,
% 2018.
%
%% ==================== CLEAN UP
clear variables
close all
%% ==================== PARAMETERS
% example DVF data
pathData = 'data/c-deformation.mat';
ioData = matfile( pathData );
F = ioData.F;
[szDom, ~] = dvf.sizeVf( F );
% inversion parameters
opt.control = 'midrange';
opt.scale = 1;
opt.numIteration = 20;
opt.stopThreshold = 1e-6;
opt.accThreshold = 0;
opt.InitialValue = [];
opt.Mask = dvf.maskDomain( F );
% create an array of inversion parameters to compare multiple schemes
opt = repmat( opt, [8 1] );
opt(1).control = 0.0; % constant mu = 0
opt(2).control = 0.5; % constant mu = 0.5
opt(3).control = 'alternating'; % alternating
opt(4).control = 'optimal'; % pointwise optimal
opt(5).control = 'midrange'; % local midrange
opt(6).control = 'midrange'; % local midrange & acc.
opt(6).accThreshold = 1; % .
opt(7).control = 'midrange'; % local midrange & acc. & multiscale
opt(7).accThreshold = 1; % .
opt(7).scale = [0.5, 1.0]; % .
opt(7).numIteration = [4 16]; % .
opt(8).control = 'optimal'; % pointwise optimal & acc. & multiscale
opt(8).accThreshold = 1; % .
opt(8).scale = [0.5, 1.0]; % .
opt(8).numIteration = [4 16]; % .
% legend labels for each control setting
lgnd = {'\mu = 0', '\mu = 0.5', '\mu_{oe}', '\mu_*(x)', '\mu_m(x)', ...
'\mu_m(x) & acc', '\mu_m(x) & acc & MS', '\mu_*(x) & acc & MS'};
% IC residual percentile curve visualization options
prcIcMeasure = [50 90 95 98 100];
argVisIcCurve = {'-o', 'LineWidth', 2};
clrIcCurve = [0.8650 0.8110 0.4330; % yellow
0.9718 0.5553 0.7741; % pink
0.6859 0.4035 0.2412; % brown
1.0000 0.5482 0.1000; % orange
0.6365 0.3753 0.6753; % purple
0.3718 0.7176 0.3612; % green
0.2941 0.5447 0.7494; % blue
0.9047 0.1918 0.1988]; % red
% IC residual maps visualization options
climIcMgn = [0 1]; % color-axis limits
%% ==================== (BEGIN)
fprintf( '\n***** BEGIN (%s) *****\n\n', mfilename );
%% ==================== VISUALIZATION: REFERENCE & DEFORMED IMAGES
fprintf( '...visualizing synthetic reference and deformed images...\n' );
IRef = util.imageGridSmooth( szDom, [15 15] );
IStd = dvf.imdeform( IRef, F );
hFig = vis.mfigure;
hFig.Name = 'reference and study (deformed) images';
% reference image
subplot( 1, 2, 1 )
imagesc( IRef.' )
axis image
colormap( gray )
title( 'reference image' )
drawnow
% study (deformed) image
subplot( 1, 2, 2 )
imagesc( IStd.' )
axis image
colormap( gray )
title( 'deformed image' )
drawnow
%% ==================== VISUALIZATION: SPECTRAL NTDC MEASURES
fprintf( '...calculating & visualizing spectral NTDC measures...\n' );
[CtrlIdx, Rho, Det, Lambda] = dvf.ntdcMeasures( F );
hFig = vis.mfigure;
hFig.Name = 'spectral NTDC measures of forward DVF';
% control index
subplot( 1, 3, 1 )
imagesc( CtrlIdx.' )
axis image
colormap( jet )
colorbar
title( 'algebraic control index' );
drawnow
% NTDC spectral radius
subplot( 1, 3, 2 )
imagesc( Rho.' )
axis image
colormap( jet )
colorbar
title( 'NTDC spectral radius' );
drawnow
% determinant map
subplot( 1, 3, 3 )
imagesc( Det.' )
axis image
colormap( jet )
colorbar
title( 'determinant map' );
drawnow
%% ==================== INVERSION
fprintf( '...computing inverse with %d iteration schemes...\n', length(opt) );
G = cell( size(opt) );
Mu = cell( size(opt) );
prctRG = cell( size(opt) );
prctRF = cell( size(opt) );
RG = cell( size(opt) );
RF = cell( size(opt) );
for i = 1 : length(opt)
fprintf( ' - scheme #%d (%s)...\n', i, lgnd{i} );
[G{i}, Mu{i}, ~, prctRG{i}, prctRF{i}] = dvf.inversion( F, opt(i) );
RG{i} = dvf.icResidual( G{i}, F );
RF{i} = dvf.icResidual( F, G{i} );
end
%% ==================== VISUALIZATION: IC RESIDUALS PER ITERATION
fprintf( '...visualizing step-wise IC residual percentile curves...\n' );
% resolution-normalized iteration steps
kstep = cell( size(opt) );
for i = 1 : length(opt)
kstep{i} = arrayfun( @(s,k) repmat( s^2 + (s~=1)/k, [1 k] ), ...
opt(i).scale, opt(i).numIteration, ...
'UniformOutput', false );
kstep{i} = cumsum( horzcat( 0, kstep{i}{:} ) );
end
hFig = vis.mfigure;
hFig.Name = 'step-wise IC residual percentile curves';
numPrct = length( prcIcMeasure );
% legend
subplot( 5, numPrct, (1:numPrct), ...
'NextPlot', 'ReplaceChildren', 'ColorOrder', clrIcCurve )
plot( nan( 2, length(opt) ), argVisIcCurve{:} );
title( 'step-wise IC residual percentile curves' )
legend( lgnd, 'Orientation', 'horizontal', 'Location', 'south' )
axis( gca, 'off' )
drawnow
for p = 1 : numPrct % ---- each percentile
% study IC residuals
subplot( 5, numPrct, p + (1:2)*numPrct )
hold on
for i = 1 : length(opt)
plot( kstep{i}, prctRG{i}(p,:), argVisIcCurve{:}, ...
'Color', clrIcCurve(i,:) );
end
ylabel( sprintf( 's_k[%d%%]', prcIcMeasure(p) ) );
xlabel( 'amortizerd iteration step (k)' )
set( gca, 'YScale', 'log' )
grid on
drawnow
% reference IC residuals
subplot( 5, numPrct, p + (3:4)*numPrct )
hold on
for i = 1 : length(opt)
plot( kstep{i}, prctRF{i}(p,:), argVisIcCurve{:}, ...
'Color', clrIcCurve(i,:) );
end
ylabel( sprintf( 'r_k[%d%%]', prcIcMeasure(p) ) );
xlabel( 'amortized iteration step (k)' )
set( gca, 'YScale', 'log' )
grid on
drawnow
end % for (p)
%% ==================== VISUALIZATION: IC RESIDUAL MAPS
fprintf( '...visualizing final IC residual maps...\n' );
fprintf( ' - white pixels indicate NaN (out-of-bounds) values\n' );
% calculate point-wise IC residual magnitudes
RGMgn = cellfun( @(r) sqrt( sum( r.^2, 3 ) ), RG, 'UniformOutput', false );
RFMgn = cellfun( @(r) sqrt( sum( r.^2, 3 ) ), RF, 'UniformOutput', false );
% study IC residuals
hFig = vis.mfigure;
hFig.Name = 'study IC residual maps';
for i = 1 : length(opt)
subplot( 2, 4, i )
pcolor( RGMgn{i}.' )
axis image
shading flat
colormap jet
caxis( climIcMgn )
colorbar
title( {lgnd{i}, 'study IC residuals s(x)'} )
drawnow
end
% reference IC residuals
hFig = vis.mfigure;
hFig.Name = 'reference IC residual maps';
for i = 1 : length(opt)
subplot( 2, 4, i )
pcolor( RFMgn{i}.' )
axis image
shading flat
colormap jet
caxis( climIcMgn )
colorbar
title( {lgnd{i}, 'reference IC residuals r(x)'} )
drawnow
end
%% ==================== VISUALIZATION: RECOVERED REFERENCE IMAGE
fprintf( '...reference image recovery...\n' );
fprintf( ' - I_rec(x) := I_std(x + v(x))\t' );
fprintf( ' [I_std(y) = I_ref(y + u(y))]\n' );
fprintf( ' = I_ref(x + v(x) + u(x + v(x)))\n' );
fprintf( ' = I_ref(x + s(x))\n' );
% ---------- calculation
fprintf( ' - calculation...\n' );
IRefRec = cell( size(opt) );
for i = 1 : length(opt)
IRefRec{i} = dvf.imdeform( IRef, RG{i} );
end
% ---------- visualization
fprintf( ' - difference image visualization (I_ref - I_rec)...\n' );
hFig = vis.mfigure;
hFig.Name = 'image-space errors in reference image recovery';
for i = 1 : length(opt)
subplot( 2, 4, i )
pcolor( (IRef - IRefRec{i}).' );
axis image
shading flat
caxis( [-1, +1] )
colormap parula
colorbar
title( {lgnd{i}, 'I_{ref}(x) - I_{ref}(x+s(x))'} )
drawnow
end
%% ==================== (END)
fprintf( '\n***** END (%s) *****\n\n', mfilename );
%%------------------------------------------------------------
%
% AUTHORS
%
% Alexandros-Stavros Iliopoulos ailiop@cs.duke.edu
%
% RELEASE
%
% 1.0.2 - December 21, 2018
%
% CHANGELOG
%
% 1.0.2 (Dec 21, 2018) - Alexandros
% + added IC residual magnitude maps
% + added image-space error maps (reference image recovery)
% + added control scheme: pointwise optimal control values with
% local search, local acceleration, and two-scale iteration
% . changed synthetic reference image to smooth version
% . parameter clean-up and explicit visualization options
%
% 1.0.0 (Oct 08, 2018) - Alexandros
% . initial version
%
% ------------------------------------------------------------
⛄ 运行结果
⛄ 参考文献
[1] A. Dubey*, A.-S. Iliopoulos*, X. Sun, F.-F. Yin, and L. Ren, "Iterative inversion of deformation vector fields with feedback control," Medical Physics, vol. 45, no. 7, pp. 3147-3160, 2018. DOI: 10.1002/mp.12962 arXiv: 1610.08589 [cs.CV]
[2] A. Dubey, "Symmetric completion of deformable registration via bi-residual inversion," PhD thesis, Duke University, Durham, NC, USA, 2018.