nearest neighbour interpolation functions for 2D images More...
Go to the source code of this file.
Functions | |
| template<class T > | |
| T | vil_nearest_interp_unsafe (double x, double y, const T *data, int, int, std::ptrdiff_t xstep, std::ptrdiff_t ystep) |
| Compute nearest neighbour interpolation at (x,y), no bound checks. Requires -0.5<x<ni-0.5, -0.5<y<nj-0.5. More... | |
| template<class T > | |
| T | vil_nearest_interp_unsafe (const vil_image_view< T > &view, double x, double y, unsigned p=0) |
| Compute nearest neighbour interpolation at (x,y), no bound checks. Requires -0.5<=x<ni-0.5, -0.5<=y<nj-0.5. More... | |
| template<class T > | |
| T | vil_nearest_interp_safe (double x, double y, const T *data, int nx, int ny, std::ptrdiff_t xstep, std::ptrdiff_t ystep) |
| Compute nearest neighbour interpolation at (x,y), with bound checks. More... | |
| template<class T > | |
| T | vil_nearest_interp_safe (const vil_image_view< T > &view, double x, double y, unsigned p=0) |
| Compute nearest neighbour interpolation at (x,y), with bound checks. More... | |
| template<class T > | |
| T | vil_nearest_interp (double x, double y, const T *data, int nx, int ny, std::ptrdiff_t xstep, std::ptrdiff_t ystep) |
| Compute nearest neighbour interpolation at (x,y), with minimal bound checks. More... | |
| template<class T > | |
| T | vil_nearest_interp (const vil_image_view< T > &view, double x, double y, unsigned p=0) |
| Compute nearest neighbour interpolation at (x,y), with minimal bound checks. More... | |
| template<class T > | |
| T | vil_nearest_interp_safe_extend (double x, double y, const T *data, int nx, int ny, std::ptrdiff_t xstep, std::ptrdiff_t ystep) |
| Compute nearest neighbour interpolation at (x,y), with bound checks. More... | |
| template<class T > | |
| T | vil_nearest_interp_safe_extend (const vil_image_view< T > &view, double x, double y, unsigned p=0) |
| Compute nearest neighbour interpolation at (x,y), with bound checks. More... | |
nearest neighbour interpolation functions for 2D images
The vil_nearest_neighbour_interp source files were derived from the corresponding vil_bilin_interp files, thus the bilin/nearest_neighbour/bicub source files are very similar. If you modify something in this file, there is a corresponding bicub and bilin files that would likely also benefit from the same change.
Definition in file vil_nearest_interp.h.
|
inline |
Compute nearest neighbour 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 [-0.5,view.ni()-0.5)*[0.5,view.nj()-0.5).
Definition at line 81 of file vil_nearest_interp.h.
|
inline |
Compute nearest neighbour interpolation at (x,y), with minimal bound checks.
If (x,y) is outside interpolatable image region and NDEBUG is not defined the code will fail an ASSERT. The safe interpolatable region is [-0.5,view.ni()-0.5)*[0.5,view.nj()-0.5).
Definition at line 101 of file vil_nearest_interp.h.
|
inline |
Compute nearest neighbour interpolation at (x,y), with bound checks.
If (x,y) is outside interpolatable image region, zero is returned. The safe interpolatable region is [-0.5,view.ni()-0.5)*[0,view.nj()-0.5).
Definition at line 49 of file vil_nearest_interp.h.
|
inline |
Compute nearest neighbour interpolation at (x,y), with bound checks.
If (x,y) is outside interpolatable image region, zero is returned. The safe interpolatable region is [-0.5,view.ni()-0.5)*[0,view.nj()-0.5).
Definition at line 67 of file vil_nearest_interp.h.
|
inline |
Compute nearest neighbour interpolation at (x,y), with bound checks.
Image is nx * ny array of Ts. x,y element is data[ystep*y+xstep*x] If (x,y) is outside safe interpolatable image region, nearest pixel value is returned. The safe interpolatable region is [-0.5,view.ni()-0.5)*[-0.5,view.nj()-0.5).
Definition at line 114 of file vil_nearest_interp.h.
|
inline |
Compute nearest neighbour interpolation at (x,y), with bound checks.
If (x,y) is outside safe interpolatable image region, nearest pixel value is returned. The safe interpolatable region is [-0.5,view.ni()-0.5)*[-0.5,view.nj()-0.5).
Definition at line 139 of file vil_nearest_interp.h.
|
inline |
Compute nearest neighbour interpolation at (x,y), no bound checks. Requires -0.5<x<ni-0.5, -0.5<y<nj-0.5.
Image is nx * ny array of Ts. x,y element is data[xstep*x+ystep*y] No bound checks are done.
Definition at line 26 of file vil_nearest_interp.h.
|
inline |
Compute nearest neighbour interpolation at (x,y), no bound checks. Requires -0.5<=x<ni-0.5, -0.5<=y<nj-0.5.
No bound checks are done.
Definition at line 40 of file vil_nearest_interp.h.
1.8.15