function [Id,Iter,Nf] = mysolve(In,mu)

% solve TVL2 denoising model:
%
%     min TV(u,tau) + .5*mu*||u-h||^2
%
% where u = vec(Id), h = vec(In), both Id and In are m x m,
% and tau > 0 is the smoothing parameter for TV.

h = In(:);
tau = 1.e-5; 
tol = 1.e-5;
maxit = 500;

% call the real solver
[u,Iter,Nf] = NCG(@TVL2N,h,tol,maxit,h,mu,tau);
Id = reshape(u,size(In));
