TuttleOFX  1
terry::geometry Namespace Reference

Data Structures

struct  PinningPerspective
struct  PinningBilinear

Functions

template<typename F , typename F2 >
boost::gil::point2< Ftransform (const PinningPerspective< F > &t, const boost::gil::point2< F2 > &src)
 Perspective transformation functor.
template<typename F , typename F2 >
boost::gil::point2< Ftransform (const PinningBilinear< F > &t, const boost::gil::point2< F2 > &src)
 Bilinear transformation functor.

Function Documentation

template<typename F , typename F2 >
boost::gil::point2<F> terry::geometry::transform ( const PinningPerspective< F > &  t,
const boost::gil::point2< F2 > &  src 
) [inline]

Perspective transformation functor.

Parameters:
[in]t,:the transformation 3x3 matrix
[in]src,:2D source point
Todo:
tuttle: modify the matrix instead

Definition at line 30 of file pinning.hpp.

References terry::geometry::PinningPerspective< Scalar >::_height, terry::geometry::PinningPerspective< Scalar >::_matrix, and terry::geometry::PinningPerspective< Scalar >::_width.

template<typename F , typename F2 >
boost::gil::point2<F> terry::geometry::transform ( const PinningBilinear< F > &  t,
const boost::gil::point2< F2 > &  src 
) [inline]

Bilinear transformation functor.

Parameters:
[in]t,:the transformation 2x4 matrix
[in]src,:2D source point

\[ x' = c[0,0]x + c[0,1]y + c[0,2]xy + c[0,3] y' = c[1,0]x + c[1,1]y + c[1,2]xy + c[1,3] \]

Definition at line 66 of file pinning.hpp.

References terry::geometry::PinningBilinear< Scalar >::_height, terry::geometry::PinningBilinear< Scalar >::_matrix, and terry::geometry::PinningBilinear< Scalar >::_width.