Home

Awesome

lambdatwist-p3p

A simple, easy to understand p3p solver with state of the art performance. http://openaccess.thecvf.com/content_ECCV_2018/html/Mikael_Persson_Lambda_Twist_An_ECCV_2018_paper.html

As of 2022 the solver has been patched to address a missing special case which is described in my thesis: https://www.diva-portal.org/smash/record.jsf?pid=diva2%3A1635583&dswid=3393

Cite the latter if the special case is relevant, otherwise cite the ECCV publication. Preferably cite both of course :P.

This is the benchmark code.

A corresponding pnp solver is found in: https://github.com/midjji/pnp

For a wrapper around the p3p specifically look to: https://github.com/midjji/pnp/blob/master/p4p.h

MethodLambdaKeKneip
ground truth found999999199972379990804
any solution found999999699996639999228
ground truth found ratio0.9999990.9997240.99908
no solution found4337772
valid according to solver168276361781196624152163
incorrect solutions output by the solver07953777325529

Lambdatwist provides all unique correct solutions, solutions output by Ke, or Kneip in addition to these are either not unique, or not correct.

TimerTotalMeanMedianMaxSamples
Lambda12s2471ns2469ns2478ns5000000
Ke17s3448ns3449ns3465ns5000000
Kneip29s5887ns5870ns5965ns5000000