In signal processing, particularly image processing, **total variation denoising**, also known as **total variation regularization** or **total variation filtering**, is a noise removal process (filter). It is based on the principle that signals with excessive and possibly spurious detail have high *total variation*, that is, the integral of the absolute image gradient is high. According to this principle, reducing the total variation of the signal—subject to it being a close match to the original signal—removes unwanted detail whilst preserving important details such as edges. The concept was pioneered by L. I. Rudin, S. Osher, and E. Fatemi in 1992 and so is today known as the *ROF model*.^{[1]}

This noise removal technique has advantages over simple techniques such as linear smoothing or median filtering which reduce noise but at the same time smooth away edges to a greater or lesser degree. By contrast, total variation denoising is remarkably effective edge-preserving filter, i.e., simultaneously preserving edges whilst smoothing away noise in flat regions, even at low signal-to-noise ratios.^{[2]}

For a digital signal , we can, for example, define the total variation as

Given an input signal , the goal of total variation denoising is to find an approximation, call it , that has smaller total variation than but is "close" to . One measure of closeness is the sum of square errors:

So the total-variation denoising problem amounts to minimizing the following discrete functional over the signal :

By differentiating this functional with respect to , we can derive a corresponding Euler–Lagrange equation, that can be numerically integrated with the original signal as initial condition. This was the original approach.^{[1]} Alternatively, since this is a convex functional, techniques from convex optimization can be used to minimize it and find the solution .^{[3]}

The regularization parameter plays a critical role in the denoising process. When , there is no smoothing and the result is the same as minimizing the sum of squares. As , however, the total variation term plays an increasingly strong role, which forces the result to have smaller total variation, at the expense of being less like the input (noisy) signal. Thus, the choice of regularization parameter is critical to achieving just the right amount of noise removal.

We now consider 2D signals *y*, such as images.
The total-variation norm proposed by the 1992 article is

and is isotropic and not differentiable. A variation that is sometimes used, since it may sometimes be easier to minimize, is an anisotropic version

The standard total-variation denoising problem is still of the form

where *E* is the 2D *L*_{2} norm. In contrast to the 1D case, solving this denoising is non-trivial. A recent algorithm that solves this is known as the primal dual method.^{[4]}

Due in part to much research in compressed sensing in the mid-2000s, there are many algorithms, such as the split-Bregman method, that solve variants of this problem.

Suppose that we are given a noisy image and wish to compute a denoised image over a 2D space. ROF showed that the minimization problem we are looking to solve is:^{[5]}

where is the set of functions with bounded variation over the domain , is the total variation over the domain, and is a penalty term. When is smooth, the total variation is equivalent to the integral of the gradient magnitude:

where is the Euclidean norm. Then the objective function of the minimization problem becomes:

From this functional, the Euler-Lagrange equation for minimization – assuming no time-dependence – gives us the nonlinear elliptic partial differential equation:

For some numerical algorithms, it is preferable to instead solve the time-dependent version of the ROF equation:

The Rudin–Osher–Fatemi model was a pivotal component in producing the first image of a black hole.^{[6]}