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

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"
Include dependency graph for finterp.c:

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)
 

Detailed Description

Fourier zero-padding interpolation.

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

Definition in file finterp.c.

Function Documentation

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.

Parameters
Destpointer to memory for holding the interpolated image
DestWidthoutput image width
XStartleftmost sample location (in input coordinates)
DestHeightoutput image height
YStartuppermost sample location (in input coordinates)
Srcthe input image
SrcWidth,SrcHeight,NumChannelsinput image dimensions
PsfSigmaGaussian PSF standard deviation
Boundaryboundary handling
Returns
1 on success, 0 on failure.

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.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

int(* ExtensionMethod[3])(int, int)
Initial value:
=
{ConstExtension, HSymExtension, WSymExtension}

Definition at line 73 of file finterp.c.