This repository is a Python implementation of the Chambolle-Pock algorithm [1] for minimizing an objective function with Total Variation (TV) regularization. It is mainly written for a didactic purpose.
Two examples are implemented :
There is also an implementation of conjugate gradient using a smoothed TV described in [2].
Simply download and execute the sample scripts. For tomographic reconstruction, the ASTRA toolbox version 1.6 should be installed beforehand.
The file CP.py implements the Chambolle-Pock algorithm for minimizing
where K can be any linear operator (here, convolution or tomographic projection).
The file CG.py implements a conjugate gradient algorithm for solving the previous problem, where the TV is approximated by
with
Both of these files can be executed.
The other files contain functions implementing various operators.