Rudin-Osher-Fatemi Total Variation Denoising using Split Bregman
|
Total variation regularized denoising demo for IPOL. More...
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "num.h"
#include "tvreg.h"
#include "imageio.h"
Go to the source code of this file.
Data Structures | |
struct | image |
struct representing an image More... | |
struct | programparams |
struct of program parameters More... | |
Macros | |
#define | DISPLAY_SCALING 255 |
Display intensities in the range [0,DISPLAY_SCALING]. | |
#define | LAMBDA_TUNE_ITERATIONS 5 |
Number of iterations for tuning lambda. | |
#define | JPEGQUALITY 95 |
Quality for writing JPEG images. | |
#define | IMAGEIO_NUM (IMAGEIO_DOUBLE) |
Functions | |
void | PrintHelpMessage () |
Print program explanation and usage. | |
int | Denoise (image u, image f, const char *Model, num Sigma, num Lambda) |
TV regularized denoising. More... | |
num | ComputeRmse (image f, image u) |
Compute the root mean-square-error between two images. | |
int | IsGrayscale (image f) |
Test whether image is grayscale. | |
static int | ParseParams (programparams *Param, int argc, char *argv[]) |
int | main (int argc, char **argv) |
int | LambdaTune (tvregopt *Opt, image u, image f, const char *Model, num Sigma) |
Tune lambda according to the discrepancy principle. More... | |
Total variation regularized denoising demo for IPOL.
Copyright (c) 2011-2012, Pascal Getreuer All rights reserved.
This program is free software: you can use, modify and/or redistribute it under the terms of the simplified BSD License. You should have received a copy of this license along this program. If not, see http://www.opensource.org/licenses/bsd-license.html.
Definition in file tvdenoise.c.
TV regularized denoising.
u | denoised image |
f | given noisy image |
Model | string specifying either "gaussian", "laplace", or "poisson" |
Sigma | the standard deviation of the noise |
Lambda | the fidelity stength |
Definition at line 237 of file tvdenoise.c.
Tune lambda according to the discrepancy principle.
Opt | tvreopt options variable |
u | the denoised image |
f | the given noisy image |
Model | string specifying either "gaussian", "laplace", or "poisson" |
Sigma | the standard deviation of the noise |
This routine tunes lambda according to the discrepancy principle. Empirical estimates of the optimal lambda value are used as the initialization.
The TV denoising computation itself is performed by TvRestore().
Definition at line 171 of file tvdenoise.c.