Home > matlab > sopt_mltb_solve_TVDNoA.m

sopt_mltb_solve_TVDNoA

PURPOSE ^

sopt_mltb_solve_TVDNoA - Solve augmented TVDN problem

SYNOPSIS ^

function sol = sopt_mltb_solve_TVDNoA(y, epsilon, A, At, S, St, param)

DESCRIPTION ^

 sopt_mltb_solve_TVDNoA - Solve augmented TVDN problem

 Solve the total variation denoising (TVDN) problem when an additional 
 linear operator S is incorporated in the TV norm, i.e. solve

   min ||S x||_TV   s.t.  ||y - A x||_2 < epsilon

 where y contains the measurements, A is the forward measurement operator 
 and At the associated adjoint operator, S is the operator appearing in
 the TV norm and St the associated adjoint operator.  The structure param 
 should contain the following fields:

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

   - 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.

   - gamma: Convergence speed (weighting of TV norm when solving for
       TV proximal operator) (default = 1e-1).
 
   - nu_TV: Bound on the norm of the operator S, i.e.
       ||S x||^2 <= nu * ||x||^2 (default = 1).

   - initsol: Initial solution for a warmstart.
 
   Projection onto the L2-ball:

   - param.tight_B2: 1 if A is a tight frame or 0 otherwise (default = 1).
 
   - nu_B2: Bound on the norm of the operator A, i.e.
       ||A x||^2 <= nu * ||x||^2 (default = 1).

   - tol_B2: Tolerance for the projection onto the L2 ball. The algorithms
       stops if
         epsilon/(1-tol) <= ||y - A z||_2 <= epsilon/(1+tol)
       (default = 1e-3).

   - max_iter_B2: Maximum number of iterations for the projection onto the
       L2 ball (default = 200).

   - pos_B2: Positivity flag (1 to impose positivity, 0 otherwise;
       default = 0).

   - real_B2: Reality flag (1 to impose reality, 0 otherwise;
       default = 0).
 
   Proximal L1 operator:

   - max_iter_TV: Used as stopping criterion for the proximal TV
       operator. Maximun number of iterations (default = 200).

   - param.weights_dx_TV: Weights for a weighted TV-norm in the x
       direction (default = 1).

   - param.weights_dy_TV: Weights for a weighted TV-norm in the y
       direction (default = 1).

 References:
 P. L. Combettes and J-C. Pesquet, "A Douglas-Rachford Splitting Approach 
 to Nonsmooth Convex Variational Signal Recovery", IEEE Journal of 
 Selected Topics in Signal Processing, vol. 1, no. 4, pp. 564-574, 2007.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function sol = sopt_mltb_solve_TVDNoA(y, epsilon, A, At, S, St, param)
0002 % sopt_mltb_solve_TVDNoA - Solve augmented TVDN problem
0003 %
0004 % Solve the total variation denoising (TVDN) problem when an additional
0005 % linear operator S is incorporated in the TV norm, i.e. solve
0006 %
0007 %   min ||S x||_TV   s.t.  ||y - A x||_2 < epsilon
0008 %
0009 % where y contains the measurements, A is the forward measurement operator
0010 % and At the associated adjoint operator, S is the operator appearing in
0011 % the TV norm and St the associated adjoint operator.  The structure param
0012 % should contain the following fields:
0013 %
0014 %   General parameters:
0015 %
0016 %   - verbose: Verbosity level (0 = no log, 1 = summary at convergence,
0017 %       2 = print main steps; default = 1).
0018 %
0019 %   - max_iter: Maximum number of iterations (default = 200).
0020 %
0021 %   - rel_obj: Minimum relative change of the objective value
0022 %       (default = 1e-4).  The algorithm stops if
0023 %           | ||x(t)||_TV - ||x(t-1)||_TV | / ||x(t)||_TV < rel_obj,
0024 %       where x(t) is the estimate of the solution at iteration t.
0025 %
0026 %   - gamma: Convergence speed (weighting of TV norm when solving for
0027 %       TV proximal operator) (default = 1e-1).
0028 %
0029 %   - nu_TV: Bound on the norm of the operator S, i.e.
0030 %       ||S x||^2 <= nu * ||x||^2 (default = 1).
0031 %
0032 %   - initsol: Initial solution for a warmstart.
0033 %
0034 %   Projection onto the L2-ball:
0035 %
0036 %   - param.tight_B2: 1 if A is a tight frame or 0 otherwise (default = 1).
0037 %
0038 %   - nu_B2: Bound on the norm of the operator A, i.e.
0039 %       ||A x||^2 <= nu * ||x||^2 (default = 1).
0040 %
0041 %   - tol_B2: Tolerance for the projection onto the L2 ball. The algorithms
0042 %       stops if
0043 %         epsilon/(1-tol) <= ||y - A z||_2 <= epsilon/(1+tol)
0044 %       (default = 1e-3).
0045 %
0046 %   - max_iter_B2: Maximum number of iterations for the projection onto the
0047 %       L2 ball (default = 200).
0048 %
0049 %   - pos_B2: Positivity flag (1 to impose positivity, 0 otherwise;
0050 %       default = 0).
0051 %
0052 %   - real_B2: Reality flag (1 to impose reality, 0 otherwise;
0053 %       default = 0).
0054 %
0055 %   Proximal L1 operator:
0056 %
0057 %   - max_iter_TV: Used as stopping criterion for the proximal TV
0058 %       operator. Maximun number of iterations (default = 200).
0059 %
0060 %   - param.weights_dx_TV: Weights for a weighted TV-norm in the x
0061 %       direction (default = 1).
0062 %
0063 %   - param.weights_dy_TV: Weights for a weighted TV-norm in the y
0064 %       direction (default = 1).
0065 %
0066 % References:
0067 % P. L. Combettes and J-C. Pesquet, "A Douglas-Rachford Splitting Approach
0068 % to Nonsmooth Convex Variational Signal Recovery", IEEE Journal of
0069 % Selected Topics in Signal Processing, vol. 1, no. 4, pp. 564-574, 2007.
0070 
0071 % Optional input arguments
0072 if ~isfield(param, 'verbose'), param.verbose = 1; end
0073 if ~isfield(param, 'rel_obj'), param.rel_obj = 1e-4; end
0074 if ~isfield(param, 'max_iter'), param.max_iter = 200; end
0075 if ~isfield(param, 'gamma'), param.gamma = 1e-2; end
0076 if ~isfield(param, 'weights_dx_TV'), param.weights_dx_TV = 1.0; end
0077 if ~isfield(param, 'weights_dy_TV'), param.weights_dy_TV = 1.0; end
0078 if ~isfield(param, 'incNP'), param.incNP = false; end
0079 if ~isfield(param, 'sphere_flag'), param.sphere_flag = false; end
0080 
0081 % Input arguments for projection onto the L2 ball
0082 param_B2.A = A; param_B2.At = At;
0083 param_B2.y = y; param_B2.epsilon = epsilon;
0084 param_B2.verbose = param.verbose;
0085 if isfield(param, 'nu_B2'), param_B2.nu = param.nu_B2; end
0086 if isfield(param, 'tol_B2'), param_B2.tol = param.tol_B2; end
0087 if isfield(param, 'tight_B2'), param_B2.tight = param.tight_B2; end
0088 if isfield(param, 'max_iter_B2')
0089     param_B2.max_iter = param.max_iter_B2;
0090 end
0091 if isfield(param,'pos_B2'), param_B2.pos=param.pos_B2; end
0092 if isfield(param,'real_B2'), param_B2.real=param.real_B2; end
0093 
0094 % Input arguments for prox TVoA
0095 param_TV.A = S; param_TV.At = St;
0096 param_TV.verbose = param.verbose; 
0097 param_TV.rel_obj = param.rel_obj;
0098 param_TV.weights_dx = param.weights_dx_TV;
0099 param_TV.weights_dy = param.weights_dy_TV;
0100 if isfield(param, 'nu_TV')
0101    param_TV.nu = param.nu_TV; 
0102 end
0103 if isfield(param, 'max_iter_TV')
0104     param_TV.max_iter= param.max_iter_TV;
0105 end
0106 if isfield(param, 'zero_weights_flag_TV')
0107    param_TV.zero_weights_flag = param.zero_weights_flag_TV; 
0108 end
0109 if isfield(param, 'identical_weights_flag_TV'), 
0110    param_TV.identical_weights_flag = param.identical_weights_flag_TV;
0111 end
0112 if isfield(param, 'sphere_flag'), 
0113    param_TV.sphere_flag = param.sphere_flag;
0114    param_TV.incNP = param.incNP;
0115 end
0116 
0117 
0118 % Initialization
0119 if isfield(param,'initsol')
0120     xhat = param.initsol;
0121 else
0122     xhat = At(y); 
0123 end
0124 
0125 iter = 1; prev_norm = 0;
0126 
0127 % Main loop
0128 while 1
0129     
0130     %
0131     if param.verbose>=1
0132         fprintf('Iteration %i:\n', iter);
0133     end
0134     
0135     % Projection onto the L2-ball
0136     [sol, param_B2.u] = sopt_mltb_fast_proj_B2(xhat, param_B2);    
0137     
0138     % Global stopping criterion
0139     curr_norm = sopt_mltb_TV_norm(S(sol), param_TV.sphere_flag, param_TV.incNP, param_TV.weights_dx, param_TV.weights_dy);
0140     rel_norm = abs(curr_norm - prev_norm)/curr_norm;
0141     if param.verbose >= 1
0142         fprintf('  ||x||_TV = %e, rel_norm = %e\n', ...
0143             curr_norm, rel_norm);
0144     end
0145     if (rel_norm < param.rel_obj)
0146         crit_BPDN = 'REL_NORM';
0147         break;
0148     elseif iter >= param.max_iter
0149         crit_BPDN = 'MAX_IT';
0150         break;
0151     end
0152     
0153     % Proximal L1 operator
0154     xhat = 2*sol - xhat;
0155     temp = sopt_mltb_prox_TVoA(xhat, param.gamma, param_TV);
0156     xhat = temp + sol - xhat;
0157     
0158     % Update variables
0159     iter = iter + 1;
0160     prev_norm = curr_norm;
0161     
0162 end
0163 
0164 % Log
0165 if param.verbose>=1
0166     % L1 norm
0167     fprintf('\n Solution found:\n');
0168     fprintf(' Final TV norm: %e\n', curr_norm);
0169     
0170     % Residual
0171     temp = A(sol);
0172     fprintf(' epsilon = %e, ||y-Ax||_2=%e\n', epsilon, ...
0173         norm(y(:)-temp(:)));
0174     
0175     % Stopping criterion
0176     fprintf(' %i iterations\n', iter);
0177     fprintf(' Stopping criterion: %s \n\n', crit_BPDN);
0178     
0179 end
0180 
0181 end

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