# Introduction

This site concerns `posest`, a C/C++ library for 3D pose
estimation from point correspondences that is distributed as open source under the GNU General Public License
(GPL).
Pose estimation refers to the computation of position and orientation estimates that fully define the
posture of a rigid object in space (6 DoF
in total). The computation is based on a set of known 3D points and their corresponding 2D projections
on an imaging sensor. The library estimates the relative motion between the 3D points and the camera.
Depending on the application, it can estimate object pose when the camera is stationary and the
points originate from a moving object, or camera pose when a camera moves freely in a mostly
stationary scene. Single or binocular camera systems are supported. Image points typically
originate from local features,
however `posest` is oblivious to their origin.
Mismatched 3D-2D point pairs (i.e. outliers) are tolerated via robust regression techniques.
Pose is estimated by optimizing physically meaningful geometric criteria.

The development of `posest` has been partially supported by the
EC FP7 programme
under grant no. 270138 DARWIN.

# Technical Overview

`posest` includes monocular and binocular pose estimation variants. Binocular pose
estimation offers increased accuracy at the cost of increased computing time.
The approach adopted in each case is outlined below; more details can be found in our
related ICVS'13 publication which is available here [bibtex].

**Monocular robust pose estimation**__Preliminary pose estimation__: A P3P or P4P solver is embedded in a RANSAC framework that uses the redescending M-estimator sample consensus (MSAC) cost function for hypotheses scoring. RANSAC determines the best scoring hypothesis and classifies correspondences into inliers and outliers. In addition to pose, the P4P solver can also yield focal length estimates (i.e., it is actually a P4Pf solver).__Non-linear refinement__: The preliminary pose is refined by minimizing the cumulative reprojection error for all inliers. To mitigate the influence of mislocalized 2D points, a M-estimate of the reprojection error rather than the squared Euclidean norm is minimized. This minimization is carried out iteratively with the Levenberg-Marquardt algorithm initialized with the preliminary pose and using analytic Jacobians.__Global optimization__: When the non-linear refinement is initiated far from the true minimum, it runs the risk of getting trapped to a local minimum. To counter this, multi-start global optimization can (optionally) be employed to explore the pose space using multiple local optimizations each initialized with a different starting point.**Binocular robust pose estimation**__Extrinsic calibration__: The two cameras are calibrated extrinsically with the aid of a calibration grid. This procedure is performed offline as the calibration is assumed to remain fixed.__Monocular pose estimation__: Pose estimation is performed individually for each of the two cameras, as described above.__Joint pose refinement__: A single pose is estimated for the binocular pair, enforcing the constraint that the relative pose of the employed cameras is known. The estimation employs the inliers of each monocular estimation and is based on the minimization of the binocular reprojection error in both images. Such an approach circumvents the error-prone reconstruction of points via triangulation and does not limit the baseline of the two views nor calls for sparse feature or 3D point matching.

`posest_demo.c`and

`binocposest_demo.c`provide working examples of using

`posest`. A MEX-file interface for using

`posest`from within matlab is also provided.

It is stressed that

`posest`does

**not**include any means for detecting and matching point features between the 3D world and images. Such functionality can be supplied by other software such as, for example, Lowe's SIFT detector & descriptor, or the VLFeat and OpenSURF libraries.

# Available Functions

`posest` provides two primary user-callable functions for performing pose estimation.
Function prototypes and a brief explanation of their arguments is provided below.
Some general conventions followed by both functions are as follows.
Points (2 or 3D) are provided as 2D arrays where rows correspond to individual
vectors and columns to vector coordinates. For example, the two 3D vectors (10., 20., 30.)
and (70., 80., 90.) are laid out in memory as

10. | 20. | 30. |

70. | 80. | 90. |

10. | 20. | 30. | 70. | 80. | 90. |

The included

`posest_demo.c`sample program gives a working example of pose estimation from user-supplied data.

`posest()`

```
.:: toggle display ::.
```

`posestBinoc()`

```
.:: toggle display ::.
```

# Contact Address

If you find this package useful or have any comments/questions/suggestions, please contact us at

Be warned that although we try to reply to most messages, it might take long to do so.

In case that you use `posest` in your published work, please cite this
paper and acknowledge this site.

hits since Thu Oct 9 12:04:27 EET 2014