Coplanar Posit - Harium/keel GitHub Wiki
Coplanar Posit is a variation of the Posit Algorithm, both was created by Daniel DeMenthon.
The difference between them is that Coplanar Posit works with coplanar points only while Posit works better with non-coplanar points.
How it works:
The main idea is compare some coplanar points coordinates to known object(model) points and statistically find the best rotation/translation to fit the object(model) projection in these points.
The first thing to do is define a set of points you want to find. Keel is set to search a square with 1 unit size, but you can define your model. After that, you have to provide, the image points corresponding exactly to the model points (In the same order!).
The result is an object containing the rotation and the translation. To make it easier, Keel already converts the rotation matrix to a normalized vector (useful to draw in OpenGL).
Usage:
PositCoplanarModifier positModifier = new PositCoplanarModifier(width, height);
RotationAxis rotationAxis = positModifier.coplanarPosit(listOfImagePoints);
rotationAxis.getAngle();
rotationAxis.getAxisX();
rotationAxis.getAxisY();
rotationAxis.getAxisZ();
rotationAxis.getTranslation();
...
By default, this modifier compare the list of image points to a square of 1 unit size. More details in CoplanarPosit class.
Example:
Illustration:


Application:
The Coplanar Posit method can be used in any case you want to discover the rotation given 4 points but it is mainly used in Augmented Reality applications.
The image below is a screenshot from LuvMotion.

LuvMotion uses Luvia over JoGL to create a fake scene, it is useful to test new algorithms in a controlled environment (noise-free).
In the upper-left corner of the image we can see what the fake camera is "seeing".