Roussos-Maragos Tensor-Driven Diffusion Interpolation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
tdinterp.c File Reference

Roussos-Maragos interpolation by tensor-driven diffusion. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <fftw3.h>
#include "basic.h"
#include "finterp.h"
#include "tdinterp.h"
#include "conv.h"
Include dependency graph for tdinterp.c:

Go to the source code of this file.

Functions

int RoussosInterp (float *u, int OutputWidth, int OutputHeight, const float *Input, int InputWidth, int InputHeight, double PsfSigma, double K, float Tol, int MaxMethodIter, int DiffIter)
 Roussos-Maragos interpolation by tensor-driven diffusion. More...
 

Detailed Description

Roussos-Maragos interpolation by tensor-driven diffusion.

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

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

Function Documentation

int RoussosInterp ( float *  u,
int  OutputWidth,
int  OutputHeight,
const float *  Input,
int  InputWidth,
int  InputHeight,
double  PsfSigma,
double  K,
float  Tol,
int  MaxMethodIter,
int  DiffIter 
)

Roussos-Maragos interpolation by tensor-driven diffusion.

Parameters
upointer to memory for holding the interpolated image
OutputWidth,OutputHeightoutput image dimensions
Inputthe input image
InputWidth,InputHeightinput image dimensions
PsfSigmaGaussian PSF standard deviation
Kparameter for constructing the tensor
Tolconvergence tolerance
MaxMethodItermaximum number of iterations
DiffIternumber of diffusion iterations per method iteration
Returns
1 on success, 0 on failure

This routine implements the projected tensor-driven diffusion method of Roussos and Maragos. Following Tschumperle, a tensor T is formed from the eigenspectra of the image structure tensor, and the image is diffused as

\[ \partial_t u = \operatorname{div}(T \nabla u). \]

In this implementation, the fast 5x5 explicit filtering scheme proposed by Weickert and Scharr is used to evolve the diffusion. The diffusion is orthogonally projected onto the feasible set (the set of images for which convolution with the PSF followed by downsampling recovers the input image). Projection is done in the Fourier domain, this is the main computational bottleneck of the method (approximately 60% of the run time is spent in DFT transforms).

Beware that this routine is relatively computationally intense, requiring around 2 to 20 seconds for outputs of typical sizes. Multithreading is applied in some computations if compiling with OpenMP. Multithreading appears to have little effect for smaller images but reduces run time by about 25% for larger images.

Definition at line 694 of file tdinterp.c.

Here is the call graph for this function:

Here is the caller graph for this function: