Home > matlab > prox_operators > sopt_mltb_prox_TV.m

sopt_mltb_prox_TV

PURPOSE ^

sopt_mltb_prox_TV - Total variation proximal operator

SYNOPSIS ^

function sol = sopt_mltb_prox_TV(x, lambda, param)

DESCRIPTION ^

 sopt_mltb_prox_TV - Total variation proximal operator

 Compute the TV proximal operator, i.e. solve

   min_{z} ||x - z||_2^2 + lambda * ||z||_{TV}

 where x is the input vector and the solution z* is returned as sol.  
 The structure param should contain the following fields:

   - max_iter: Maximum number of iterations (default = 200).

   - rel_obj: Minimum relative change of the objective value 
       (default = 1e-4).  The algorithm stops if
           | ||x(t)||_TV - ||x(t-1)||_TV | / ||x(t)||_TV < rel_obj,
       where x(t) is the estimate of the solution at iteration t.

   - verbose: Verbosity level (0 = no log, 1 = summary at convergence, 
       2 = print main steps; default = 1).

 Reference:
 [1] A. Beck and  M. Teboulle, "Fast gradient-based algorithms for
 constrained Total Variation Image Denoising and Deblurring Problems", 
 IEEE Transactions on Image Processing, VOL. 18, NO. 11, 2419-2434, 
 November 2009.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function sol = sopt_mltb_prox_TV(x, lambda, param)
0002 % sopt_mltb_prox_TV - Total variation proximal operator
0003 %
0004 % Compute the TV proximal operator, i.e. solve
0005 %
0006 %   min_{z} ||x - z||_2^2 + lambda * ||z||_{TV}
0007 %
0008 % where x is the input vector and the solution z* is returned as sol.
0009 % The structure param should contain the following fields:
0010 %
0011 %   - max_iter: Maximum number of iterations (default = 200).
0012 %
0013 %   - rel_obj: Minimum relative change of the objective value
0014 %       (default = 1e-4).  The algorithm stops if
0015 %           | ||x(t)||_TV - ||x(t-1)||_TV | / ||x(t)||_TV < rel_obj,
0016 %       where x(t) is the estimate of the solution at iteration t.
0017 %
0018 %   - verbose: Verbosity level (0 = no log, 1 = summary at convergence,
0019 %       2 = print main steps; default = 1).
0020 %
0021 % Reference:
0022 % [1] A. Beck and  M. Teboulle, "Fast gradient-based algorithms for
0023 % constrained Total Variation Image Denoising and Deblurring Problems",
0024 % IEEE Transactions on Image Processing, VOL. 18, NO. 11, 2419-2434,
0025 % November 2009.
0026 
0027 % Optional input arguments
0028 if ~isfield(param, 'rel_obj'), param.rel_obj = 1e-4; end
0029 if ~isfield(param, 'verbose'), param.verbose = 1; end
0030 if ~isfield(param, 'max_iter'), param.max_iter = 200; end
0031 
0032 % Initializations
0033 [r, s] = sopt_mltb_gradient_op(x*0);
0034 pold = r; qold = s;
0035 told = 1; prev_obj = 0;
0036 
0037 % Main iterations
0038 if param.verbose > 1
0039     fprintf('  Proximal TV operator:\n');
0040 end
0041 for iter = 1:param.max_iter
0042     
0043     % Current solution
0044     sol = x - lambda*sopt_mltb_div_op(r, s);
0045     
0046     % Objective function value
0047     obj = .5*norm(x(:)-sol(:), 2)^2 + lambda * sopt_mltb_TV_norm(sol, 0);
0048     rel_obj = abs(obj-prev_obj)/obj;
0049     prev_obj = obj;
0050     
0051     % Stopping criterion
0052     if param.verbose>1
0053         fprintf('   Iter %i, obj = %e, rel_obj = %e\n', ...
0054             iter, obj, rel_obj);
0055     end
0056     if rel_obj < param.rel_obj
0057         crit_TV = 'TOL_EPS'; break;
0058     end
0059     
0060     % Udpate divergence vectors and project
0061     [dx, dy] = sopt_mltb_gradient_op(sol);
0062     r = r - 1/(8*lambda) * dx; s = s - 1/(8*lambda) * dy;
0063     weights = max(1, sqrt(abs(r).^2+abs(s).^2));
0064     p = r./weights; q = s./weights;
0065     
0066     % FISTA update
0067     t = (1+sqrt(4*told^2))/2;
0068     r = p + (told-1)/t * (p - pold); pold = p;
0069     s = q + (told-1)/t * (q - qold); qold = q;
0070     told = t;
0071     
0072 end
0073 
0074 % Log after the minimization
0075 if ~exist('crit_TV', 'var'), crit_TV = 'MAX_IT'; end
0076 if param.verbose >= 1
0077     fprintf(['  Prox_TV: obj = %e, rel_obj = %e,' ...
0078         ' %s, iter = %i\n'], obj, rel_obj, crit_TV, iter);
0079 end
0080 
0081 end

Generated on Fri 22-Feb-2013 15:54:47 by m2html © 2005