TooN Algorithm Library - tag  0.2
Classes | Functions
DEPRECATED Pose estimation from 4 2D-3D point correspondences - use 3 point instead
Collaboration diagram for DEPRECATED Pose estimation from 4 2D-3D point correspondences - use 3 point instead:

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)
 

Detailed Description

This group contains a function and a related RANSAC estimator to compute a camera pose from 4 2D-3D point correspondences.

Function Documentation

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.

Parameters
[in]pointsa vector containing 4 3D points
[in]pixelsa vector containing 4 2D pixels as 3D vectors to allow arbitrary image planes
[out]validoutput argument, it is set to true to signal a valid result and false otherwise
[in]angularErrormaximal angular error that will be tolerated before no result can be computed. The default value corresponds to 90 deg VOW over 640 pixels.
Returns
SE3 describing the camera pose

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.

Parameters
[in]pointsa vector containing 4 3D points
[in]pixelsa vector containing 4 2D pixels as 3D vectors to allow arbitrary image planes
[out]validoutput argument, it is set to true to signal a valid result and false otherwise
[in]angularErrormaximal angular error that will be tolerated before no result can be computed. The default value corresponds to 90 deg VOW over 640 pixels.
Returns
SE3 describing the camera pose

References tag::computeAbsoluteOrientation(), and tag::fourPointSolver().

Referenced by tag::Point4SE3Estimation< ImagePlaneZ >::estimate().