Total Variation Inpainting using Split Bregman
Data Structures | Macros | Functions
tvinpaint.c File Reference

Total variation regularized inpainting 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...
 

Macros

#define DISPLAY_SCALING   255
 Display intensities in the range [0,DISPLAY_SCALING].
 
#define JPEGQUALITY   95
 Quality for writing JPEG images.
 
#define IMAGEIO_NUM   (IMAGEIO_DOUBLE)
 

Functions

void PrintHelpMessage ()
 Print program explanation and usage.
 
int Inpaint (image u, image f, image D, num Lambda)
 TV regularized inpainting. More...
 
num ComputeRmse (image f, image u)
 
void ThresholdD (image D, num Lambda)
 
int IsGrayscale (image f)
 Test whether image is grayscale.
 
int main (int argc, char **argv)
 

Detailed Description

Total variation regularized inpainting demo for IPOL.

Author
Pascal Getreuer getre.nosp@m.uer@.nosp@m.gmail.nosp@m..com

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 tvinpaint.c.

Function Documentation

int Inpaint ( image  u,
image  f,
image  D,
num  Lambda 
)

TV regularized inpainting.

Parameters
udenoised image
fgiven noisy image
Dthe inpainting domain
Lambdathe fidelity weight
Returns
1 on success, 0 on failure

This wrapper routine sets up the inpainting problem. The actual split Bregman computation is performed in TvRestore().

Definition at line 151 of file tvinpaint.c.