Table of Contents

Enum SolvePnPMethod

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Method for solving a PnP problem:

public enum SolvePnPMethod

Fields

AP3P = 5

Method is based on the paper of T. Ke, S. Roumeliotis "An Efficient Algebraic Solution to the Perspective-Three-Point Problem" In this case the function requires exactly four object and image points.

DLS = 3

Broken implementation. Using this flag will fallback to EPnP. Joel A. Hesch and Stergios I. Roumeliotis. "A Direct Least-Squares (DLS) Method for PnP"

EPNP = 1

Method has been introduced by F.Moreno-Noguer, V.Lepetit and P.Fua in the paper “EPnP: Efficient Perspective-n-Point Camera Pose Estimation”.

IPPE = 6

Method is based on the paper of T. Collins and A. Bartoli. "Infinitesimal Plane-Based Pose Estimation". This method requires coplanar object points.

IPPE_SQUARE = 7

Method is based on the paper of Toby Collins and Adrien Bartoli. "Infinitesimal Plane-Based Pose Estimation". This is a special case suitable for marker pose estimation. It requires 4 coplanar object points defined in the following order:

  • point 0: [-squareLength / 2, squareLength / 2, 0]
  • point 1: [squareLength / 2, squareLength / 2, 0]
  • point 2: [squareLength / 2, -squareLength / 2, 0]
  • point 3: [-squareLength / 2, -squareLength / 2, 0]
Iterative = 0

Iterative method is based on Levenberg-Marquardt optimization. In this case the function finds such a pose that minimizes reprojection error, that is the sum of squared distances between the observed projections imagePoints and the projected (using projectPoints() ) objectPoints. Initial solution for non-planar "objectPoints" needs at least 6 points and uses the DLT algorithm. Initial solution for planar "objectPoints" needs at least 4 points and uses pose from homography decomposition. Method is based on the paper "Pose refinement using non-linear Levenberg-Marquardt minimization scheme".

P3P = 2

Method is based on the paper of Ding, Y., Yang, J., Larsson, V., Olsson, C., & Åstrom, K. "Revisiting the P3P Problem". In this case the function requires exactly four object and image points.

SQPNP = 8

Method is based on the paper "A Consistently Fast and Globally Optimal Solution to the Perspective-n-Point Problem" by G. Terzakis and M. Lourakis. It requires 3 or more points.

UPNP = 4

Broken implementation. Using this flag will fallback to EPnP. Method is based on the paper of A.Penate-Sanchez, J.Andrade-Cetto, F.Moreno-Noguer. "Exhaustive Linearization for Robust Camera Pose and Focal Length Estimation"