#include <include/spice/composite.hpp>
template<typename T>
nearest_neighbor class
Nearest neighbour interpolation between pixels adjacent to x
and y
by returning the value of the pixel to the top-left of x
and y
.
Template parameters | |
---|---|
T | type of pixel values |
Contents
Constructors, destructors, conversion operators
- nearest_neighbor(image<T> const& source) explicit
- Construct a new nearest neighbor interpolation object.
Public functions
- auto operator()(float x, float y) -> color<T>
- Get the interpolated value at the provided coordinates.
Function documentation
template<typenameT>
spice:: interpolation:: nearest_neighbor<T>:: nearest_neighbor(image<T> const& source) explicit
Construct a new nearest neighbor interpolation object.
Parameters | |
---|---|
source | the image to interpolate |
template<typenameT>
color<T> spice:: interpolation:: nearest_neighbor<T>:: operator()(float x,
float y)
Get the interpolated value at the provided coordinates.
Parameters | |
---|---|
x | |
y | |
Returns | color<T> |