This module removes artefacts due to grey-level shifts between horizontal lines. This problem often occurs with infrared images, when the captors have not been equalized. The correction is simple~: from an input image $u$, we find the parameter $k(y)$ so that the total variation of the output image $v(x,y)=u(x,y)+k(y)$ is as small as possible. The algorithm minimizes the quantity $\sum_x |u(x,y+1)+\delta(y)-u(x,y)|$ with respect to $\delta$ along each line, then retrieves $k(y)$ by $k(y+1)=k(y)+\delta(y)$, and chooses $k(0)$ in order to preserve the global mean of the input image $u$.
\index{total variation!captor equalization}
