bpdq_2d_tv

PURPOSE ^

bpdq_2d_tv : Implementation of BPDQ-TV for 2d reconstruction

SYNOPSIS ^

function [xstar,D] = bpdq_2d_tv(yq,A,At,dim,epsilon,p,varargin)

DESCRIPTION ^

 bpdq_2d_tv : Implementation of BPDQ-TV for 2d reconstruction 

 [xstar,D] = bpdq_2d_tv(yq,A,At,dim,epsilon,p,varargin)

 Implements reconstruction from quantized Fourier measurements

 xstar  = argmin_x ||x||_TV s.t. ||yq-A*x||_p <= epsilon

 Inputs:
 yq - quantized measurements
 A - function handle implementing sensing matrix
 At - function handle implementing transpose of sensing matrix
 dim - 2d dimensions of image 

 This file is part of BPDQ Toolbox (Basis Pursuit DeQuantizer)
 Copyright (C) 2009, the BPDQ Team (see the file AUTHORS distributed with
 this library) (See the notice at the end of the file.)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % bpdq_2d_tv : Implementation of BPDQ-TV for 2d reconstruction
0002 %
0003 % [xstar,D] = bpdq_2d_tv(yq,A,At,dim,epsilon,p,varargin)
0004 %
0005 % Implements reconstruction from quantized Fourier measurements
0006 %
0007 % xstar  = argmin_x ||x||_TV s.t. ||yq-A*x||_p <= epsilon
0008 %
0009 % Inputs:
0010 % yq - quantized measurements
0011 % A - function handle implementing sensing matrix
0012 % At - function handle implementing transpose of sensing matrix
0013 % dim - 2d dimensions of image
0014 %
0015 % This file is part of BPDQ Toolbox (Basis Pursuit DeQuantizer)
0016 % Copyright (C) 2009, the BPDQ Team (see the file AUTHORS distributed with
0017 % this library) (See the notice at the end of the file.)
0018 
0019 function [xstar,D] = bpdq_2d_tv(yq,A,At,dim,epsilon,p,varargin)
0020   control_params={'dr_verbosity',0,...
0021                   'dr_maxiter',50,...
0022                   'dr_gamma',.1,...
0023                   'dr_lambda',1};
0024   argselectAssign(control_params);
0025   argselectCheck(control_params,varargin);
0026   argselectAssign(varargin);
0027   
0028   % unpack complex vector into vector of reals
0029   c2r = @(x) [real(x(:));imag(x(:))];
0030   r2c = @(x) x(1:end/2)+sqrt(-1)*x(end/2+1:end);
0031   
0032   % Assuming A*A' = nu * I ; compute nu
0033   x=rand(size(yq));
0034   nu=(At(x))'*At(x)/(x'*x);
0035   
0036   % define prox operators
0037   % f1 is modified lpball. As A is tight frame, fca type iteration
0038   % is not needed, can use direct formula to get prox(f(A(x))
0039   prox_lp =@(x) r2c(bpdq_proj_lpball_mex( c2r(x),c2r(yq),epsilon,p));
0040   proxf1 =@(x,tgamma) x+ (1/nu)*At( prox_lp(A(x)) - A(x));  
0041   
0042   % f2 is TV norm. Note : the need to reshape back to 2-d array to compute
0043   % prox of TV norm is why dim must given
0044   tvprox_opts={'min_rel_obj',5e-4,'it_max',500,'verbose',0};
0045   tv_prox=@(x,tgamma)vec(bpdq_prox_tv_mex(real(reshape(x,dim)),tgamma,...
0046                                           tvprox_opts{:}));
0047   proxf2=tv_prox;
0048   
0049   % init point
0050   % x0=real( vec( samp_t(yq))/prod(dim) );
0051   x0=At(yq)/prod(dim);
0052   [xstar,dr_relerr_save]=bpdq_d_r_iter(proxf1,proxf2,dr_gamma,dr_lambda,x0,...
0053                                        'dr_verbosity',dr_verbosity,...
0054                                        'dr_maxiter',dr_maxiter);
0055   D.dr_relerr_save=dr_relerr_save;
0056   
0057 % The BPDQ Toolbox is free software: you can redistribute it and/or modify
0058 % it under the terms of the GNU General Public License as published by
0059 % the Free Software Foundation, either version 3 of the License, or
0060 % (at your option) any later version.
0061 %
0062 % The BPDQ Toolbox is distributed in the hope that it will be useful,
0063 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0064 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0065 % GNU General Public License for more details.
0066 %
0067 % You should have received a copy of the GNU General Public License
0068 % along with The BPDQ Toolbox.  If not, see <http://www.gnu.org/licenses/>.

Generated on Mon 06-Jul-2009 14:16:10 by m2html © 2003