**Macro**

**Swtvdenoise** Signal denoising using wavelet and total variation

**Usage**

**Swtvdenoise** *[-P % coeff. to threshold] [-T Threshold] [-D standard dev. (Donoho threshold)] [-O ortho. wavelet] [-E] [-s] [-J number of levels] [-N number of iterations] [-a alpha] [-I input_partially_denoised_signal] [-S output_thresholded_signal] [-V output_minimal_tv_signal] [-r ] input_noisy_signal [output_denoised_signal]*

**Description**

This user's macro allows to easily run a wavelet-denoising algorithm
combining a total variation (TV) minimization approach,
by calling the module `stvrestore`.
The first presentation of these method has been made in [DF01],
while in [DF03] one will find the detail of the algorithm
together with the proof of the convergence.

In short, the approach is motivated by wavelet signal denoising methods, where
thresholding small wavelet coefficients leads to pseudo-Gibbs artifacts. By replacing
these thresholded coefficients by values minimizing the total variation of the
reconstructed signal, the method performs a nearly artifact free signal denoising.
Minimizing total variation has first been proposed by Rudin, Osher and Fatemi
in the context of image denoising [ROF92][RO94],
see module `tvdenoise`.

The meaning of options given in the usage are the following :

-P | : | give the percent of wavelet coefficients to remove. |

-T | : | give the threshold. |

-D | : | compute the threshold from the noise standard deviation (Donoho's threshold). |

-O | : | give the wavelet filter. |

-E | : | special edge processing (default is periodized). |

-s | : | soft thresholding (default is hard thresholding). |

-J | : | number of levels in the wavelet transform. |

-N | : | number of iterations of the TV minimization algorithm. |

-a | : | without -a compute exact TV, with -a a smooth version. |

-I | : | allows to resume the TV minimization with previously denoised signal. |

-S | : | output the reconstructed signal after wavelet thresholding. |

-V | : | allows to output the signal having the minimal TV. |

-r | : | relax constraint on approximation space V_J. |

From this list, the options you may want to set to get results close to the ones
reported in [DF01] and [DF03] are
`-r`, `-P` and `-N` (for these last two options, set the parameters' value as
indicated in the article).

**Version 1.02**

Last Modification date : Apr 3 2003

**Author**

Jacques Froment