prior_TV

PURPOSE ^

PRIOR_TV calculate Total Variation image prior

SYNOPSIS ^

function Reg= prior_TV( inv_model );

DESCRIPTION ^

 PRIOR_TV calculate Total Variation image prior
 Reg= prior_TV( 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= prior_TV( inv_model );
0002 % PRIOR_TV calculate Total Variation image prior
0003 % Reg= prior_TV( 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: prior_TV.m 3389 2012-07-02 12:12:36Z bgrychtol $
0009 
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
0027 
0028 if isfield(inv_model.fwd_model,'coarse2fine')
0029      Reg = Reg*inv_model.fwd_model.coarse2fine;
0030 end

Generated on Wed 21-Jun-2017 09:29:07 by m2html © 2005