normTVinv2

Computes the norm induced by the inner product innergrad.

Contents

Syntax

n = normTVinv2(gus,seti)

Description

n = normTVinv2(gus,seti) computes the norm on gradient gus, which is generated by the inner product innergrad.

Input Arguments

The input arguments are described in normTVinv1.html:

Output Argument

More About

The norm is generated by the inner product innergrad, i.e.

$\langle x, y \rangle_{\mathrm{tv},\bf{R}}$,

and is not $\|\cdot\|_{\mathrm{tv},R}$ (normTVinv1.html), see [1, Sec. 4.5 above eq. (59)].

normTVinv2 uses rNorm = 2, apart from that it is similar to normTVinv1.

References

See Also

Code

function n = normTVinv2(gus,seti)
% Old name: n = \|\nabla u\|_{TV,2}

absgu = normTVinvAux(gus,seti);

rNorm = 2;

if seti.dim == 2
    n = (sum(sum(absgu.^rNorm))*seti.dVinv).^(1/rNorm); % \|grad(u)\|_{TV,2} =  \sqrt{ \sum_i,j | (grad(u))_i,j |^2 }
elseif seti.dim == 3
    n = (sum(sum(sum(absgu.^rNorm)))*seti.dVinv).^(1/rNorm);
end

end