core/vil/vil_bicub_interp.h File Reference


Detailed Description

Bicubic interpolation functions for 2D images.

The vil bicub source files were derived from the corresponding vil bilin files, thus the vil bilin/bicub source files are very similar. If you modify something in this file, there is a corresponding bilin file that would likely also benefit from the same change.

Definition in file vil_bicub_interp.h.

#include <vcl_cassert.h>
#include <vcl_cstddef.h>
#include <vil/vil_image_view.h>

Go to the source code of this file.


Functions

template<class T>
double vil_bicub_interp_unsafe (double x, double y, const T *data, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep)
 Compute bicubic interpolation at (x,y), no bound checks. Requires 1<x<ni-3, 1<y<nj-3.
template<class T>
double vil_bicub_interp_unsafe (double x, double y, const T *data, int, int, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep)
 Compute bicubic interpolation at (x,y), no bound checks. Requires 1<x<ni-3, 1<y<nj-3.
template<class T>
double vil_bicub_interp_raw (double x, double y, const T *data, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep)
 Compute bicubic interpolation at (x,y), no bound checks.
template<class T>
double vil_bicub_interp_raw (double x, double y, const T *data, int, int, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep)
 Compute bicubic interpolation at (x,y), no bound checks.
template<class T>
double vil_bicub_interp_safe (double x, double y, const T *data, int nx, int ny, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep)
 Compute bicubic interpolation at (x,y), with bound checks.
template<class T>
double vil_bicub_interp (double x, double y, const T *data, int nx, int ny, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep)
 Compute bicubic interpolation at (x,y), with minimal bound checks.
template<class T>
double vil_bicub_interp_safe_extend (double x, double y, const T *data, int nx, int ny, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep)
 Compute bicubic interpolation at (x,y), with bound checks.

Function Documentation

template<class T>
double vil_bicub_interp ( double  x,
double  y,
const T *  data,
int  nx,
int  ny,
vcl_ptrdiff_t  xstep,
vcl_ptrdiff_t  ystep 
) [inline]

Compute bicubic interpolation at (x,y), with minimal bound checks.

Image is nx * ny array of Ts. x,y element is data[ystep*y+xstep*x] If (x,y) is outside interpolatable image region and NDEBUG is not defined the code will fail an ASSERT. The safe interpolatable region is [1,nx-2]*[1,ny-2].

Definition at line 96 of file vil_bicub_interp.h.

template<class T>
double vil_bicub_interp_raw ( double  x,
double  y,
const T *  data,
int  ,
int  ,
vcl_ptrdiff_t  xstep,
vcl_ptrdiff_t  ystep 
) [inline]

Compute bicubic interpolation at (x,y), no bound checks.

Image is nx * ny array of Ts. x,y element is data[xstep*x+ystep*y] No bound checks are done. This is a version of vil_bicub_interp_raw with the same function signature as vil_bicub_interp_safe.

Definition at line 54 of file vil_bicub_interp.h.

template<class T>
double vil_bicub_interp_raw ( double  x,
double  y,
const T *  data,
vcl_ptrdiff_t  xstep,
vcl_ptrdiff_t  ystep 
)

Compute bicubic interpolation at (x,y), no bound checks.

Image is nx * ny array of Ts. x,y element is data[xstep*x+ystep*y] No bound checks are done.

Definition at line 73 of file vil_bicub_interp.txx.

template<class T>
double vil_bicub_interp_safe ( double  x,
double  y,
const T *  data,
int  nx,
int  ny,
vcl_ptrdiff_t  xstep,
vcl_ptrdiff_t  ystep 
) [inline]

Compute bicubic interpolation at (x,y), with bound checks.

Image is nx * ny array of Ts. x,y element is data[xstep*x+ystep*y] If (x,y) is outside interpolatable image region, zero is returned. The safe interpolatable region is [1,nx-2]*[1,ny-2].

Definition at line 66 of file vil_bicub_interp.h.

template<class T>
double vil_bicub_interp_safe_extend ( double  x,
double  y,
const T *  data,
int  nx,
int  ny,
vcl_ptrdiff_t  xstep,
vcl_ptrdiff_t  ystep 
) [inline]

Compute bicubic interpolation at (x,y), with bound checks.

Image is nx * ny array of Ts. x,y element is data[nx*y+x] If (x,y) is outside safe interpolatable image region, nearest pixel value is returned. The safe interpolatable region is [1,nx-2]*[1,ny-2].

Definition at line 126 of file vil_bicub_interp.h.

template<class T>
double vil_bicub_interp_unsafe ( double  x,
double  y,
const T *  data,
int  ,
int  ,
vcl_ptrdiff_t  xstep,
vcl_ptrdiff_t  ystep 
) [inline]

Compute bicubic interpolation at (x,y), no bound checks. Requires 1<x<ni-3, 1<y<nj-3.

Image is nx * ny array of Ts. x,y element is data[xstep*x+ystep*y] No bound checks are done. This is a version of vil_bicub_interp_unsafe with the same function signature as vil_bicub_interp_safe.

Definition at line 31 of file vil_bicub_interp.h.

template<class T>
double vil_bicub_interp_unsafe ( double  x,
double  y,
const T *  data,
vcl_ptrdiff_t  xstep,
vcl_ptrdiff_t  ystep 
)

Compute bicubic interpolation at (x,y), no bound checks. Requires 1<x<ni-3, 1<y<nj-3.

Image is nx * ny array of Ts. x,y element is data[xstep*x+ystep*y] No bound checks are done.

Definition at line 28 of file vil_bicub_interp.txx.


Generated on Thu Aug 28 05:08:10 2008 for core/vil by  doxygen 1.5.1