The Total Variation Denoising Problem is given by:

$$ \arg \min_{x} \frac{1}{2} {\left\| A x - y \right\|}_{2}^{2} + \lambda \operatorname{TV} \left( x \right) $$

Where $ \operatorname{TV} \left( \cdot \right) $ is the Total Variation Norm.

How could one solve this using MATLAB?


1 Answer 1


I will solve this for 1D but it could easily generalize into 2D.

The nice thing about the TV Norm that it can be re formulated by the $ {L}_{1} $ norm of the Derivative Operator:

$$ \operatorname{TV} \left( x \right) = \sum_{i = 1}^{N - 1} \left| {x}_{i + 1} - {x}_{i} \right| = {\left\| D x \right\|}_{1} $$

Where $ D $ is the matrix form of the Derivative Operator.
So the whole problem can be formulated as:

$$ \arg \min_{x} \frac{1}{2} {\left\| A x - y \right\|}_{2}^{2} + \lambda \operatorname{TV} \left( x \right) = \arg \min_{x} \frac{1}{2} {\left\| A x - y \right\|}_{2}^{2} + \lambda {\left\| D x \right\|}_{1} $$

For the above there are many solvers based on ADMM or Proximal Gradient Descent.
You could even use the Sub Gradient Method to solve the above as the Sub Gradient is given by:

$$ {A}^{T} \left( A x - y \right) + {D}^{T} \operatorname{sign} \left( D x \right) $$


Your Answer

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