-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdenoiseTV.m
More file actions
31 lines (28 loc) · 861 Bytes
/
Copy pathdenoiseTV.m
File metadata and controls
31 lines (28 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function [out,oValues] = denoiseTV( in, lambda, varargin )
% out = denoiseTV( in, lambda [, varargin ] )
%
% perform total variation denoising on the input
%
% Inputs:
% in - input array to be denoised
% lambda - the regularization parameter
%
% Optional Inputs:
% varargin - the same optional parameters available to lsqrTV
%
% Outputs:
% out - the denoised array
%
% Written by Nicholas Dwork - Copyright 2021
%
% This software is offered under the GNU General Public License 3.0. It
% is offered without any warranty expressed or implied, including the
% implied warranties of merchantability or fitness for a particular
% purpose.
applyA = @(x,op) x;
if nargout > 1
[out,oValues] = lsqrTV( applyA, in, in, lambda, varargin{:} );
else
out = lsqrTV( applyA, in, in, lambda, varargin{:} );
end
end