# Total variation denoising

A noisy signal $$y = x + n$$ can be denoised, under the assumption that $$x$$ is piecewise constant, by solving the problem $\hat x_\lambda = \mathrm{argmin}_x \|y - x\|_2^2 + \lambda \|Dx\|_{1}$ where $$Dx$$ denotes the discrete derivative of $$x$$.

The bottom graph demonstrates the taut string interpretation of TV denoising, where $$Y$$ is the cumulative sum of $$y$$. $$\hat x_\lambda$$ is then found as the discrete derivative of $$\hat X_\lambda$$.

$$\lambda$$