|
template<typename T , typename TFactor > |
static T | linear (const T &v0, const T &v1, const TFactor &t) |
| Performs a linear interpolation between two values. More...
|
|
template<typename T , typename TFactor > |
static T | bilinear (const T &v00, const T &v01, const T &v10, const T &v11, const TFactor &tx, const TFactor &ty) |
| Performs a bi-linear interpolation between four values within a 2x2 neighborhood. More...
|
|
template<typename T , typename TFactor > |
static T | bilinear (const T &v00, const T &v01, const T &v10, const T &v11, const bool valid00, const bool valid01, const bool valid10, const bool valid11, const TFactor &tx, const TFactor &ty) |
| Performs a bi-linear interpolation between at most four values within a 2x2 neighborhood. More...
|
|
template<typename T , typename TFactor > |
static T | cubic (const T &v0, const T &v1, const T &v2, const T &v3, const TFactor &t) |
| Performs a cubic (Catmull-Rom) interpolation between mainly two values while two further supporting points are requested. More...
|
|
template<typename T , typename TKey > |
static T | lagrange2 (const TKey &x0, const T &y0, const TKey &x1, const T &y1, const TKey &x) |
| Performs a Lagrange interpolation for a polynomial with degree 2. More...
|
|
template<typename T , typename TKey > |
static T | lagrange3 (const TKey &x0, const T &y0, const TKey &x1, const T &y1, const TKey &x2, const T &y2, const TKey &x) |
| Performs a Lagrange interpolation for a polynomial with degree 3. More...
|
|
This class implements data interpolation functions.
An interpolation value of 0 provides the first value, 1 provides the second value.
template<typename T , typename TFactor >
T Ocean::Interpolation::bilinear |
( |
const T & |
v00, |
|
|
const T & |
v01, |
|
|
const T & |
v10, |
|
|
const T & |
v11, |
|
|
const bool |
valid00, |
|
|
const bool |
valid01, |
|
|
const bool |
valid10, |
|
|
const bool |
valid11, |
|
|
const TFactor & |
tx, |
|
|
const TFactor & |
ty |
|
) |
| |
|
inlinestatic |
Performs a bi-linear interpolation between at most four values within a 2x2 neighborhood.
This function allows the interpolation between a subset of the given four values.
Thus, boolean statements for each individual value define whether the corresponding value is applied for interpolation or not.
If only one value is provided, than the 'interpolation' result is the value itself without investigating the interpolation factors.
The layout of the four values are defined as follows:
v00 v01
v10 v11
- Parameters
-
v00 | Top left value |
v01 | Top right value |
v10 | Bottom left value |
v11 | Bottom right value |
valid00 | True, if the value v00 is valid and has to be applied for interpolation |
valid01 | True, if the value v01 is valid and has to be applied for interpolation |
valid10 | True, if the value v10 is valid and has to be applied for interpolation |
valid11 | True, if the value v11 is valid and has to be applied for interpolation |
tx | Horizontal (left - right) interpolation factor, with range [0, 1] |
ty | Vertical (top - bottom) interpolation factor, with range [0, 1] |
- Returns
- Resulting interpolation value
- Template Parameters
-
T | Data type of the values to be interpolated |
TFactor | Data type of the interpolation value |