PYRET (PYthon REstoreTools)

PYRET is a python package for image deblurring. Its design is based on James Nagy's Matlab package RestoreTools (http://www.mathcs.emory.edu/~nagy/RestoreTools/). The syntax of PYRET is similar to RestoreTools, so the documentation of RestoreTools still apply to PYRET. One can also consult the docstring of each function or class for documentation.

One special feature that is in PYRET but not in RestoreTools is the inclusion of image-dependent boundary conditions. We named this boundary condition "synthetic boundary condition". In many cases, it gives better deblurring results than classical periodic (circular) and reflexive (Neumann) boundary conditions. For details of this boundary condition, see http://www.mathcs.emory.edu/~yfan/SyntheticBC/index.html.

The structure of PYRET is designed to be easy to understand. It can serve as an example of how to do scientific computation with Python.

Download PYRET 1.0.2 here.
Some functionalities of PYRET are demonstrated on our online image deblurring page.

Requirements

PYRET requires the following python package to run. The corresponding Debian/Ubuntu packages are shown in parenthesis.

We suggest the following python packages to facilitate the usage of PYRET.

Installation

Just unpack pyret-1.0.tgz into any directory you choose, then you can start using PYRET by cd into this directory. To use PYRET in other directories, you have to add the directory in which you unpack PYRET to the environment variable PYTHONPATH.

Classes and functions in PYRET

Classes

psfMatrix:class to simulate image blurring
fftPrec:class for FFT preconditioning
dctPrec:class for DCT preconditioning

The multiplication (*) has been overloaded, so blurring or preconditioning can be done as matrix multiplications.

Direct methods

tsvd_fft:FFT spectral decomposition with TSVD regularization
tik_fft:FFT spectral decomposition with Tikhonov regularization
tsvd_dct:DCT spectral decomposition with TSVD regularization
tik_dct:DCT spectral decomposition with Tikhonov regularization
tsvd_sep:Separable PSF deconvolution with TSVD regularization
tik_sep:Separable PSF deconvolution with Tikhonov regularization

Iterative methods

lsqr:LSQR
cgls:CGLS
mrnsd:MRNSD
mr2:MR2
plsqr:Preconditioned LSQR
pcgls:Preconditioned CGLS
pmrnsd:Preconditioned MRNSD
pmr2:Preconditioned MR2

How to pronounce PYRET?

PYRET is pronounced as "pirate". We find this name quite interesting. We speculate a future add-on to PYRET for parallel computation. This parallel add-on will be called PARRET for PARrellel REstoreTools. Obviously, and quite coincidentally, PARRET is pronounced as "parrot".