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)$?


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.

  • $\begingroup$ I guess this all comes down to the complex derivative of the magnitude function, which is not defined. Is there any work- around? $\endgroup$
    – Stiefel
    Oct 31, 2012 at 15:38
  • $\begingroup$ 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? $\endgroup$
    – Jason R
    Nov 2, 2012 at 2:30
  • $\begingroup$ 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. $\endgroup$
    – Stiefel
    Nov 2, 2012 at 10:54
  • $\begingroup$ For such a specialized complex analysis question, you might have better success posting over at math.SE. $\endgroup$
    – Jason R
    Nov 2, 2012 at 12:23
  • $\begingroup$ @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? $\endgroup$
    – Eric
    Nov 2, 2012 at 15:23

1 Answer 1


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:


A detailed account of Wirtinger calculus for signal processing problems is


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)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.