3D pose estimation algorithm (coplanar case).

Namespace:  AForge.Math.Geometry
Assembly:  AForge.Math (in AForge.Math.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public class CoplanarPosit

Remarks

The class implements an algorithm for 3D object's pose estimation from it's 2D coordinates obtained by perspective projection, when the object is described coplanar points. The idea of the implemented math and algorithm is described in "Iterative Pose Estimation using Coplanar Feature Points" paper written by Oberkampf, Daniel DeMenthon and Larry Davis (the implementation of the algorithm is very close translation of the pseudo code given by the paper, so should be easy to follow).

Note:At this point the implementation works only with models described by 4 points, which is the minimum number of points enough for 3D pose estimation.

Note:The 4 model's point are supposed to be coplanar, i.e. supposed to reside all within same planer. See Posit for none coplanar case.

Read 3D Pose Estimation article for additional information and samples.

Sample usage:

CopyC#
// points of real object - model
Vector3[] copositObject = new Vector3[4]
{ 
    new Vector3( -56.5f, 0,  56.5f ),
    new Vector3(  56.5f, 0,  56.5f ),
    new Vector3(  56.5f, 0, -56.5f ),
    new Vector3( -56.5f, 0, -56.5f ),
};
// focal length of camera used to capture the object
float focalLength = 640; // depends on your camera or projection system
// initialize CoPOSIT object
CoplanarPosit coposit = new CoplanarPosit( copositObject, focalLength );
// 2D points of te object - projection
AForge.Point[] projectedPoints = new AForge.Point[4]
{
    new AForge.Point( -77,  48 ),
    new AForge.Point(  44,  66 ),
    new AForge.Point(  75, -36 ),
    new AForge.Point( -61, -58 ),
};
// estimate pose
Matrix3x3 rotationMatrix;
Vector3 translationVector;
coposit.EstimatePose( projectedPoints,
    out rotationMatrix, out translationVector );

Inheritance Hierarchy

System..::.Object
  AForge.Math.Geometry..::.CoplanarPosit

See Also