Roussos-Maragos Tensor-Driven Diffusion Interpolation
|
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"
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... | |
Roussos-Maragos interpolation by tensor-driven diffusion.
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.
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.
u | pointer to memory for holding the interpolated image |
OutputWidth,OutputHeight | output image dimensions |
Input | the input image |
InputWidth,InputHeight | input image dimensions |
PsfSigma | Gaussian PSF standard deviation |
K | parameter for constructing the tensor |
Tol | convergence tolerance |
MaxMethodIter | maximum number of iterations |
DiffIter | number of diffusion iterations per method iteration |
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
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.