ab_calc_tv_prior

PURPOSE ^

AB_PRIOR_TV calculate Total Variation image prior

SYNOPSIS ^

function Reg= ab_calc_tv_prior( inv_model );

DESCRIPTION ^

 AB_PRIOR_TV calculate Total Variation image prior
 Reg= ab_calc_tv_prior( inv_model )
 Reg        => output regularization term
 inv_model  => inverse model struct

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function Reg= ab_calc_tv_prior( inv_model );
0002 % AB_PRIOR_TV calculate Total Variation image prior
0003 % Reg= ab_calc_tv_prior( inv_model )
0004 % Reg        => output regularization term
0005 % inv_model  => inverse model struct
0006 
0007 % (C) 2005 Andy Adler. License: GPL version 2 or version 3
0008 % $Id: ab_calc_tv_prior.m 3227 2012-06-29 21:53:39Z aadler $
0009 warning('EIDORS:deprecated','AB_CALC_TV_PRIOR is deprecated as of 06-Jun-2012. Use PRIOR_TV instead.');
0010 % Andrea's code requires a msh
0011 elem = inv_model.fwd_model.elems;
0012 node = inv_model.fwd_model.nodes;
0013 
0014 dims= size(node,2);
0015 
0016 if dims==2
0017     msh.TC = elem';
0018     msh.PC = node';
0019     Reg= TV_operator_2D( msh );
0020 elseif dims==3
0021     msh.elem_c = elem;
0022     msh.vtx_c  = node;
0023     Reg= TV_operator_3D( msh );
0024 else
0025     error('problem dimension must be 2 or 3');
0026 end

Generated on Fri 30-Dec-2022 19:44:54 by m2html © 2005