TooN Algorithm Library - tag  0.2
Functions
Helper functions

Functions

template<class It >
void tag::getProjectiveHomography (It begin, It end, TooN::Matrix< 3 > &H)
 
template<class It >
TooN::Matrix< 3 > tag::getProjectiveHomography (It begin, It end)
 
int tag::find_quartic_real_roots (double B, double C, double D, double E, double r[])
 

Detailed Description

This group contains various helper functions used throughout tag. Most functions come in pairs where one version writes the result to a passed in parameter and the second uses the first to return a new result to the caller.

Function Documentation

int tag::find_quartic_real_roots ( double  B,
double  C,
double  D,
double  E,
double  r[] 
)

A function to find the real roots of a quartic polynomial x^4 + Bx^3 + Cx^2 + Dx + E. It efficiently implements the quartic formula as given by Cardano, Harriot, et al. The precision of the resulting roots depends on the nature of the coefficients. Sufficient precision can be ensured by refining the resulting roots using Newton's method.

Parameters
[in]Bthe coefficient of the cubic term
[in]Cthe coefficient of the quadratic term
[in]Dthe coefficient of the linear term
[in]Ethe coefficient of the constant term
[out]ran array in which 0, 2, or 4 real roots will be stored
Returns
the number of real roots

References tag::depressed_cubic_real_roots().

Referenced by tag::three_point_pose().

template<class It >
void tag::getProjectiveHomography ( It  begin,
It  end,
TooN::Matrix< 3 > &  H 
)

estimates a 2D homography between two sets of correspondences. The observations passed (via iterators) to the estimate method must allow:

TooN::Vector<2> a = first_point(*it); // default value is "(*it).first"
TooN::Vector<2> b = second_point(*it); // default value is "(*it).second"
double R = noise(*it); // default value is "1.0"

At least 4 correspondences are needed. The resulting H returned satisfies b = H a, where a, b are in homogenous coordinates.

Parameters
beginiterator pointing to the begin of the sequence
enditerator to the end of the sequence (after the last element)
[out]Hresulting homography

References tag::first_point(), tag::noise(), and tag::second_point().

Referenced by tag::Homography::estimate(), and tag::getProjectiveHomography().

template<class It >
TooN::Matrix<3> tag::getProjectiveHomography ( It  begin,
It  end 
)

return version of the 2D homography estimation between two sets of correspondences. The observations passed (via iterators) to the estimate method must allow:

TooN::Vector<2> a = first_point(*it); // default value is "(*it).first"
TooN::Vector<2> b = second_point(*it); // default value is "(*it).second"
double R = noise(*it); // default value is "1.0"

At least 4 correspondences are needed. The resulting H returned satisfies b = H a, where a, b are in homogenous coordinates.

Parameters
beginiterator pointing to the begin of the sequence
enditerator to the end of the sequence (after the last element)
Returns
resulting homography

References tag::getProjectiveHomography().