cr.sparse.lop.tv2D

cr.sparse.lop.tv2D(shape, kind='regular')[source]

Returns a total variation linear operator for 2D images

Parameters
  • shape (int) – Shape of the input images (model space)

  • kind (str) – Boundary condition for handling differences

Returns

An linear operator which computes the variation in 2D images

Return type

(Operator)

Note

The output is a complex image. The horizontal differences are stored in the real part and the vertical differences are stored in the imaginary part.

To compute the total variation, we first apply the linear operator and then compute the norm of the variation image.