last update 20 Sep 2009 |
#include <cvrBilinearInterpolation.h>
Classes | |
class | parameters |
The parameters for the class bilinearInterpolation. More... | |
Public Member Functions | |
bilinearInterpolation () | |
bilinearInterpolation (const eBoundaryType boundaryType) | |
bilinearInterpolation (const parameters &par) | |
bilinearInterpolation (const bilinearInterpolation< T > &other) | |
virtual | ~bilinearInterpolation () |
virtual const std::string & | name () const |
virtual T | apply (const vector< T > &src, const float &x) const |
virtual T | apply (const float &x) const |
virtual T | apply (const matrix< T > &src, const float &row, const float &col) const |
virtual T | apply (const matrix< T > &src, const point< float > &p) const |
virtual T | apply (const float &row, const float &col) const |
virtual T | apply (const point< float > &p) const |
T | interpolate (const matrix< T > &src, const float row, const float col) const |
T | interpolate (const float row, const float col) const |
T | interpolateUnchk (const matrix< T > &src, const float row, const float col) const |
T | interpolateUnchk (const float row, const float col) const |
T | compute (const float fy, const float fx, const T syx, const T syx1, const T sy1x, const T sy1x1) const |
T | compute (const float fx, const T sx, const T sx1) const |
bilinearInterpolation< T > & | copy (const bilinearInterpolation< T > &other) |
bilinearInterpolation< T > & | operator= (const bilinearInterpolation< T > &other) |
virtual bilinearInterpolation < T > * | clone () const |
virtual bilinearInterpolation < T > * | newInstance () const |
const parameters & | getParameters () const |
int | getRangeOfInfluence () const |
The type T of the template is the type of the elements of the vector or matrix used.
cvr::bilinearInterpolation< T >::bilinearInterpolation | ( | ) |
Default constructor.
cvr::bilinearInterpolation< T >::bilinearInterpolation | ( | const eBoundaryType | boundaryType | ) |
Construct an interpolation with the given boundary type.
cvr::bilinearInterpolation< T >::bilinearInterpolation | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
cvr::bilinearInterpolation< T >::bilinearInterpolation | ( | const bilinearInterpolation< T > & | other | ) |
virtual cvr::bilinearInterpolation< T >::~bilinearInterpolation | ( | ) | [virtual] |
Destructor.
virtual T cvr::bilinearInterpolation< T >::apply | ( | const point< float > & | p | ) | const [virtual] |
Returns the interpolated value of the matrix specified with use() at the real valued position p.
p | the real valued position to be interpolated. |
Implements cvr::fixedGridInterpolation< T >.
virtual T cvr::bilinearInterpolation< T >::apply | ( | const float & | row, | |
const float & | col | |||
) | const [virtual] |
Returns the interpolated value of the matrix specified with use() at the real valued position (row,col).
row | which row | |
col | which column |
Implements cvr::fixedGridInterpolation< T >.
virtual T cvr::bilinearInterpolation< T >::apply | ( | const matrix< T > & | src, | |
const point< float > & | p | |||
) | const [virtual] |
Returns the interpolated value of the matrix at the real valued position p.
src | matrix<T> with the source data. | |
p | the real valued position to be interpolated. |
Implements cvr::fixedGridInterpolation< T >.
virtual T cvr::bilinearInterpolation< T >::apply | ( | const matrix< T > & | src, | |
const float & | row, | |||
const float & | col | |||
) | const [virtual] |
Returns the interpolated value of the matrix at the real valued position (row,col).
src | matrix<T> with the source data. | |
row | which row | |
col | which column |
Implements cvr::fixedGridInterpolation< T >.
virtual T cvr::bilinearInterpolation< T >::apply | ( | const float & | x | ) | const [virtual] |
Returns the interpolated value of the vector specified with use() at the real valued position x.
x | the real valued position to be interpolated. |
Implements cvr::fixedGridInterpolation< T >.
virtual T cvr::bilinearInterpolation< T >::apply | ( | const vector< T > & | src, | |
const float & | x | |||
) | const [virtual] |
Returns the interpolated value of the vector at the real valued position x.
src | vector<T> with the source data. | |
x | the real valued position to be interpolated. |
Implements cvr::fixedGridInterpolation< T >.
virtual bilinearInterpolation<T>* cvr::bilinearInterpolation< T >::clone | ( | ) | const [virtual] |
T cvr::bilinearInterpolation< T >::compute | ( | const float | fx, | |
const T | sx, | |||
const T | sx1 | |||
) | const [inline] |
Compute the linear interpolated value for the given coefficients and values.
This method is provided for convenience only. Use at your own risk.
fx | fractional term between 0 and 1 | |
sx | value for sx==0 | |
sx1 | value for sx==1 |
T cvr::bilinearInterpolation< T >::compute | ( | const float | fy, | |
const float | fx, | |||
const T | syx, | |||
const T | syx1, | |||
const T | sy1x, | |||
const T | sy1x1 | |||
) | const [inline] |
Compute the bilinear interpolated value for the given coefficients and values.
This method is provided for convenience only. Use at your own risk.
fy | fractional term between 0 and 1 | |
fx | fractional term between 0 and 1 | |
syx | value for fx==0 fy==0 | |
syx1 | value for fx==1 fy==0 | |
sy1x | value for fx==0 fy==1 | |
sy1x1 | value for fx==1 fy==1 |
bilinearInterpolation<T>& cvr::bilinearInterpolation< T >::copy | ( | const bilinearInterpolation< T > & | other | ) |
const parameters& cvr::bilinearInterpolation< T >::getParameters | ( | ) | const |
int cvr::bilinearInterpolation< T >::getRangeOfInfluence | ( | ) | const [virtual] |
This method returns which pixel range around the interpolated postition is considered by the interpolation functor.
This is very useful for other functors to decide whether they should call the interpolate() methods or the faster interpolateUnchk() methods.
If the returned value is a and the interpolated position is (x,y) all pixels with coordinates in may be considered by the interpolation functor.
Implements cvr::fixedGridInterpolation< T >.
T cvr::bilinearInterpolation< T >::interpolate | ( | const float | row, | |
const float | col | |||
) | const [inline] |
Returns the interpolated value of the matrix specified with use() at the real valued position (row,col).
This method is not virtual and can be used if this interpolation type is used as template parameter in time critical situations
row | which row | |
col | which column |
T cvr::bilinearInterpolation< T >::interpolate | ( | const matrix< T > & | src, | |
const float | row, | |||
const float | col | |||
) | const |
Returns the interpolated value of the matrix at the real valued position (row,col).
This method is not virtual and can be used if this interpolation type is used as template parameter in time critical situations
src | matrix<T> with the source data. | |
row | which row | |
col | which column |
T cvr::bilinearInterpolation< T >::interpolateUnchk | ( | const float | row, | |
const float | col | |||
) | const [inline] |
Returns the interpolated value of the matrix specified with use() at the real valued position (row,col).
This method is not virtual and can be used if this interpolation type is used as template parameter in time critical situations
row | which row | |
col | which column |
T cvr::bilinearInterpolation< T >::interpolateUnchk | ( | const matrix< T > & | src, | |
const float | row, | |||
const float | col | |||
) | const [inline] |
Returns the interpolated value of the matrix at the real valued position (row,col).
This method does not check if the given coordinates and the rest of used points in the src matrix lie within the valid range. This is left to you. Please consider that for the bilinear interpolation not only the point(trunc(col),trunc(row)) is used, but also its three "next" neighbors ((col,row+1),(col+1,row),(col+1,row+1)).
This method is not virtual and can be used in time critical situations, where you prefer to take the boundary control by yourself.
src | matrix<T> with the source data. | |
row | which row | |
col | which column |
virtual const std::string& cvr::bilinearInterpolation< T >::name | ( | ) | const [virtual] |
virtual bilinearInterpolation<T>* cvr::bilinearInterpolation< T >::newInstance | ( | ) | const [virtual] |
bilinearInterpolation<T>& cvr::bilinearInterpolation< T >::operator= | ( | const bilinearInterpolation< T > & | other | ) |