LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::biquadraticInterpolator< T > Class Template Reference

This functor use biquadratic interpolation to approximate values between the pixels or elements of vectors and matrices. More...

#include <ltiBiquadraticInterpolator.h>

Inheritance diagram for lti::biquadraticInterpolator< T >:
Inheritance graph
[legend]
Collaboration diagram for lti::biquadraticInterpolator< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 biquadraticInterpolator ()
 biquadraticInterpolator (const eBoundaryType boundaryType)
 biquadraticInterpolator (const biquadraticInterpolator< T > &other)
virtual ~biquadraticInterpolator ()
virtual const char * getTypeName () const
apply (const vector< T > &src, const float &x) const
apply (const float &x) const
apply (const matrix< T > &src, const float &row, const float &col) const
apply (const matrix< T > &src, const tpoint< float > &p) const
apply (const float &row, const float &col) const
apply (const tpoint< float > &p) const
interpolate (const matrix< T > &src, const float row, const float col) const
interpolate (const float row, const float col) const
interpolateUnchk (const matrix< T > &src, const float row, const float col) const
interpolateUnchk (const float row, const float col) const
biquadraticInterpolatorcopy (const biquadraticInterpolator &other)
virtual functorclone () const
const parametersgetParameters () const
compute (const float fx, const T y0, const T y1, const T y2) const
compute (const float fy, const float fx, const T *const data) const
compute (const float fy, const float fx, const T y00, const T y01, const T y02, const T y10, const T y11, const T y12, const T y20, const T y21, const T y22) const

Detailed Description

template<class T>
class lti::biquadraticInterpolator< T >

This functor use biquadratic interpolation to approximate values between the pixels or elements of vectors and matrices.

The type T of the template is the type of the elements of the vector or matrix used.


Constructor & Destructor Documentation

template<class T>
lti::biquadraticInterpolator< T >::biquadraticInterpolator (  ) 

default constructor

template<class T>
lti::biquadraticInterpolator< T >::biquadraticInterpolator ( const eBoundaryType  boundaryType  ) 

Construct an interpolator with the given boundary type.

template<class T>
lti::biquadraticInterpolator< T >::biquadraticInterpolator ( const biquadraticInterpolator< T > &  other  ) 

copy constructor

Parameters:
other the object to be copied
template<class T>
virtual lti::biquadraticInterpolator< T >::~biquadraticInterpolator (  )  [virtual]

destructor


Member Function Documentation

template<class T>
T lti::biquadraticInterpolator< T >::apply ( const tpoint< float > &  p  )  const [virtual]

Returns the interpolated value of the matrix specified with use() at the real valued position p.

Parameters:
p the real valued position to be interpolated.
Returns:
the interpolated value of the matrix.

Implements lti::scalarValuedInterpolation< T >.

template<class T>
T lti::biquadraticInterpolator< 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).

Parameters:
row which row
col which column
Returns:
the interpolated value of the matrix.

Implements lti::scalarValuedInterpolation< T >.

template<class T>
T lti::biquadraticInterpolator< T >::apply ( const matrix< T > &  src,
const tpoint< float > &  p 
) const [virtual]

Returns the interpolated value of the matrix at the real valued position p.

Parameters:
src matrix<T> with the source data.
p the real valued position to be interpolated.
Returns:
the interpolated value of the matrix.

Implements lti::scalarValuedInterpolation< T >.

template<class T>
T lti::biquadraticInterpolator< 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).

Parameters:
src matrix<T> with the source data.
row which row
col which column
Returns:
the interpolated value of the matrix.

Implements lti::scalarValuedInterpolation< T >.

template<class T>
T lti::biquadraticInterpolator< T >::apply ( const float &  x  )  const [virtual]

Returns the interpolated value of the vector specified with use() at the real valued position x.

Parameters:
x the real valued position to be interpolated.
Returns:
the interpolated value of the vector.

Implements lti::scalarValuedInterpolation< T >.

template<class T>
T lti::biquadraticInterpolator< T >::apply ( const vector< T > &  src,
const float &  x 
) const [virtual]

Returns the interpolated value of the vector at the real valued position x.

Parameters:
src vector<T> with the source data.
x the real valued position to be interpolated.
Returns:
the interpolated value of the vector.

Implements lti::scalarValuedInterpolation< T >.

template<class T>
virtual functor* lti::biquadraticInterpolator< T >::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::scalarValuedInterpolation< T >.

template<class T>
T lti::biquadraticInterpolator< T >::compute ( const float  fy,
const float  fx,
const T  y00,
const T  y01,
const T  y02,
const T  y10,
const T  y11,
const T  y12,
const T  y20,
const T  y21,
const T  y22 
) const [inline]

Compute the biquadratic interpolated value for the given coefficients and values.

This method is provided for convenience only. Use at your own risk.

Parameters:
fy fractional term between -0.5 and 0.5
fx fractional term between -0.5 and 0.5
y00 value for fx==-1 fy==-1
y01 value for fx==-1 fy== 0
y02 value for fx==-1 fy==+1
y10 value for fx== 0 fy==-1
y11 value for fx== 0 fy== 0
y12 value for fx== 0 fy==+1
y20 value for fx==+1 fy==-1
y21 value for fx==+1 fy== 0
y22 value for fx==+1 fy==+1
Returns:
interpolated value between the four corners

References lti::biquadraticInterpolator< T >::compute().

template<class T>
T lti::biquadraticInterpolator< T >::compute ( const float  fy,
const float  fx,
const T *const   data 
) const [inline]

Compute the biquadratic interpolated value for the given coefficients and values.

This method is provided for convenience only. Use at your own risk.

Parameters:
fy fractional term between -0.5 and 0.5
fx fractional term between -0.5 and 0.5
data array of 9 elements
Returns:
interpolated value between the four corners

References lti::biquadraticInterpolator< T >::compute().

template<class T>
T lti::biquadraticInterpolator< T >::compute ( const float  fx,
const T  y0,
const T  y1,
const T  y2 
) const [inline]

Compute the biquadratic interpolated value for the given coefficients and values.

This method is provided for convenience only. Use at your own risk.

Parameters:
fx fractional term between -0.5 and 0.5
y0 value for fx==-1.0 (note that is a value beyond the valid range of fx)
y1 value for fx==0.0
y2 value for fx==1.0 (note that is a value beyond the valid range of fx)
Returns:
interpolated value between the three values

Referenced by lti::biquadraticInterpolator< T >::compute(), and lti::biquadraticInterpolator< T >::interpolateUnchk().

template<class T>
biquadraticInterpolator& lti::biquadraticInterpolator< T >::copy ( const biquadraticInterpolator< T > &  other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::scalarValuedInterpolation< T >.

template<class T>
const parameters& lti::biquadraticInterpolator< T >::getParameters (  )  const

returns used parameters

Reimplemented from lti::scalarValuedInterpolation< T >.

template<class T>
virtual const char* lti::biquadraticInterpolator< T >::getTypeName (  )  const [virtual]

returns the name of this type ("biquadraticInterpolator")

Reimplemented from lti::scalarValuedInterpolation< T >.

template<class T>
T lti::biquadraticInterpolator< 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

Parameters:
row which row
col which column
Returns:
the interpolated value of the matrix.
template<class T>
T lti::biquadraticInterpolator< 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

Parameters:
src matrix<T> with the source data.
row which row
col which column
Returns:
the interpolated value of the matrix.

Referenced by lti::biquadraticInterpolator< ubyte >::interpolate().

template<class T>
T lti::biquadraticInterpolator< 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

Parameters:
row which row
col which column
Returns:
the interpolated value of the matrix.

References lti::biquadraticInterpolator< T >::interpolateUnchk(), and lti::scalarValuedInterpolation< T >::theMatrix.

template<class T>
T lti::biquadraticInterpolator< 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 biquadratic interpolation not only the point(trunc(col),trunc(row)) is used, but a 3x3 neighborhood centered such that (col,row) is nearest to the center.

This method is not virtual and can be used in time critical situations, where you prefer to take the boundary control by yourself.

Parameters:
src matrix<T> with the source data.
row which row
col which column
Returns:
the interpolated value of the matrix.

References lti::genericMatrix< T >::at(), and lti::biquadraticInterpolator< T >::compute().

Referenced by lti::biquadraticInterpolator< T >::interpolateUnchk().


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:27:03 2010 for LTI-Lib by Doxygen 1.6.1