[][src]Module p3p::nordberg

Implementation based on "Lambda Twist: An Accurate Fast Robust Perspective Three Point (P3P) Solver" Persson, M. and Nordberg, K. ECCV 2018. Reference implementation available on the author github repository.

Structs

Pose

Pose of a camera (almost) returned by the solve function. Beware that the result of the solve function isn't exactly the rotation and translation of the camera itself in world coordinates. It is the rotation and translation pair satisfying the equation: $$ \lambda_i \ \bm{y_i} = \bm{R \ x_i} + \bm{t},\quad i \in \{1, 2, 3\} $$

Functions

error

Compute the angular residual between the bearing vector and the 3D point projection vector. Return 1 - cos(angle).

solve

Return 0 to 4 potential $(\bm{R}, \bm{t})$ solutions to the equation: $$ \lambda_i \ \bm{y_i} = \bm{R \ x_i} + \bm{t},\quad i \in \{1, 2, 3\} $$