TooN Algorithm Library - tag
0.2
|
Classes | |
struct | tag::Point4SE3Estimation< ImagePlaneZ > |
Functions | |
TooN::SE3 | tag::fourPointPose (const std::vector< TooN::Vector< 3 > > &points, const std::vector< TooN::Vector< 3 > > &pixels, bool &valid, const double angularError=0.14) |
TooN::SE3 | tag::fourPointPoseFromCamera (const std::vector< TooN::Vector< 3 > > &points, const std::vector< TooN::Vector< 3 > > &pixels, bool &valid, const double angularError=0.14) |
This group contains a function and a related RANSAC estimator to compute a camera pose from 4 2D-3D point correspondences.
TooN::SE3 tag::fourPointPose | ( | const std::vector< TooN::Vector< 3 > > & | points, |
const std::vector< TooN::Vector< 3 > > & | pixels, | ||
bool & | valid, | ||
const double | angularError = 0.14 |
||
) |
The main function for pose estimation from 4 2D - 3D point correspondences. It implements the algorithm given by This function assumes that the 4 points are in general position (not in a single plane) and can solve the problem for all cases, e.g. points do not have to lie in front of the camera etc. Input is a list of 3D positions and a list of 3D vectors describing the ray under which the transformed points are seen by the origin. It does not assume any special camera setup other than the origin being the center of the camera. Ouput is the SE3 describing the camera pose and a flag signaling if the result is valid.
[in] | points | a vector containing 4 3D points |
[in] | pixels | a vector containing 4 2D pixels as 3D vectors to allow arbitrary image planes |
[out] | valid | output argument, it is set to true to signal a valid result and false otherwise |
[in] | angularError | maximal angular error that will be tolerated before no result can be computed. The default value corresponds to 90 deg VOW over 640 pixels. |
References tag::computeAbsoluteOrientation(), and tag::fourPointSolver().
TooN::SE3 tag::fourPointPoseFromCamera | ( | const std::vector< TooN::Vector< 3 > > & | points, |
const std::vector< TooN::Vector< 3 > > & | pixels, | ||
bool & | valid, | ||
const double | angularError = 0.14 |
||
) |
A special case of the general fourPointPose function which assumes that points are in front of a given camera plane but now may also lie in the same plane (but not all on one line). The frontal assumption is made for the data, but not encoded in any constraint. Care should be taken that the given 3D vectors for the directions are actually pointing towards the points, not away from them. In the general case, all points in a plane has two solutions, if we assume that all points are in front of the camera, there is only one solution. It also is slighlty more optimized, because it does not need to check as many cases.
[in] | points | a vector containing 4 3D points |
[in] | pixels | a vector containing 4 2D pixels as 3D vectors to allow arbitrary image planes |
[out] | valid | output argument, it is set to true to signal a valid result and false otherwise |
[in] | angularError | maximal angular error that will be tolerated before no result can be computed. The default value corresponds to 90 deg VOW over 640 pixels. |
References tag::computeAbsoluteOrientation(), and tag::fourPointSolver().
Referenced by tag::Point4SE3Estimation< ImagePlaneZ >::estimate().