# Gradient of total variation of magnitude of complex function for denoising

Say I have a complex function $f^*$ (e.g. a MRI image) that has a near piece-wise constant magnitude, but a non constant phase.

If I have an optimization problem to find $f^*$ and set up an objective function with a total variation term (e.g. for denoising or compressed sensing) it usually has the following form:

$$obj_1(f) = \ldots + \text{TV}(f)$$

However, since I assume that $f$ has a piece-wise constant magnitude, I think it might be better to use:

$$obj_2(f) = \ldots + \text{TV}(|f|)$$

However, for a gradient based solver, one would have to know the gradient of obj2. The gradient for $obj_1(f)$ is: $\text{TV}'\left(TV(f)\right)$. What is the gradient of $obj_2(f)$?

Update:

Intuitively I would assume something like the following (since the phase has no influence on $obj_2$, leave the phase "untouched"):

$$\text{TV}'\left(TV(|f|)\right)* e^{i \arg(f)}$$

However, my knowledge in complex analysis is very limited and I am not sure if this makes sense.

-
I guess this all comes down to the complex derivative of the magnitude function, which is not defined. Is there any work- around? – Stiefel Oct 31 '12 at 15:38
This is way outside of my comfort zone, but if $f$ has constant magnitude, wouldn't $|f|$ be constant, and therefore its total variation be zero? – Jason R Nov 2 '12 at 2:30
Sorry, I fixed the question. The optimum f* is supposed to have a "piece-wise constant" magnitude. The denoising algorithms is usually iterative, and the intermediate f is not yet piece-wise constant - we need the gradient to iteratively make f piece-wise constant. – Stiefel Nov 2 '12 at 10:54
For such a specialized complex analysis question, you might have better success posting over at math.SE. – Jason R Nov 2 '12 at 12:23
@Stiefel This may not apply to your situation at all, but have you thought about perhaps moving the MRI into the spatial domain and applying Total Variation minimization there? Could you say a little bit more about the context in which you are using TV minimization for MRI? – Eric Nov 2 '12 at 15:23

The problem with $\left|f\right|$ is that since is not analytic the standard definition of complex derivative does not apply. A solution is to use Wirtinger derivatives:

http://en.wikipedia.org/wiki/Wirtinger_derivatives

A detailed account of Wirtinger calculus for signal processing problems is

http://arxiv.org/abs/0906.4835

Another (probably simpler) option is to treat the complex image as a two-channel (real,imag) image and use the definition of derivative for vector fields. This paper has a very clear explanation on how to do this:

Lee, H.-C.; Cok, D.R.; "Detecting boundaries in a vector field" (IEEE Transactions on Signal Processing, vol.39, no.5, pp.1181-1194, May 1991)

-
Thank you, this looks very promising. – Stiefel Nov 7 '12 at 21:42