Roussos-Maragos Tensor-Driven Diffusion Interpolation
|
Fourier zero-padding interpolation. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <fftw3.h>
#include "basic.h"
#include "finterp.h"
Go to the source code of this file.
Functions | |
int | FourierScale2d (float *Dest, int DestWidth, float XStart, int DestHeight, float YStart, const float *Src, int SrcWidth, int SrcHeight, int NumChannels, double PsfSigma, boundaryhandling Boundary) |
Scale image with Fourier zero padding. More... | |
Variables | |
int(* | ExtensionMethod [3])(int, int) |
Fourier zero-padding interpolation.
Definition in file finterp.c.
int FourierScale2d | ( | float * | Dest, |
int | DestWidth, | ||
float | XStart, | ||
int | DestHeight, | ||
float | YStart, | ||
const float * | Src, | ||
int | SrcWidth, | ||
int | SrcHeight, | ||
int | NumChannels, | ||
double | PsfSigma, | ||
boundaryhandling | Boundary | ||
) |
Scale image with Fourier zero padding.
Dest | pointer to memory for holding the interpolated image |
DestWidth | output image width |
XStart | leftmost sample location (in input coordinates) |
DestHeight | output image height |
YStart | uppermost sample location (in input coordinates) |
Src | the input image |
SrcWidth,SrcHeight,NumChannels | input image dimensions |
PsfSigma | Gaussian PSF standard deviation |
Boundary | boundary handling |
The image is first mirror folded with half-sample even symmetry to avoid boundary artifacts, then transformed with a real-to-complex DFT.
The interpolation is computed so that Dest[m + DestWidth*n] is the interpolation of Input at sampling location (XStart + m*SrcWidth/DestWidth, YStart + n*SrcHeight/DestHeight) for m = 0, ..., DestWidth - 1, n = 0, ..., DestHeight - 1, where the pixels of Src are located at the integers.
Definition at line 266 of file finterp.c.