PnP

class sonic.PnP

A class to solve for the PnP

Method Summary
static PnPCalibrated(x_C, points_I, method, covx, computeCov)

Estimate the pose of a calibrated camera using the Perspective-n-Point with specified method.

References: - [1] Henry, S., & Christian, J. A. (2024).

Optimal DLT-based Solutions for the Perspective-n-Point. https://doi.org/10.48550/arXiv.2410.14164

Inputs:
  • x_C (sonic.Points2): image plane coordinates

(equivalent of K^-1 * pixel coordinates) - points_I (sonic.Points3): respective 3D position objects

that are used for estimation

  • method (string): “DLT” (normalized DLT)

    or “oDLT” (optimal DLT)

  • covx (OPTIONAL)
    • DEFAULT: unit variance

    • (1x1 double): isotropic variance, same for all measurements

    • (1xn double): isotropic variance of points2

  • computeCov (1x1 logical) (OPTIONAL): flag to decide whether to compute covariance or not. This will make the PnP function slightly slower. Defaults to false.

Outputs:
  • pose (sonic.Pose): camera pose

  • covVecP (12x12 double) covariance of the vectorized

camera matrix P

Last revised: 11/24/24 Last author: Sebastien Henry

static PnPUncalibrated(u_C, p_I, method, covu, computeCov)

Estimate the pose of a calibrated camera using the Perspective-n-Point with specified method.

References: - [1] Henry, S., & Christian, J. A. (2024).

Optimal DLT-based Solutions for the Perspective-n-Point. https://doi.org/10.48550/arXiv.2410.14164

Inputs:
  • u_C (sonic.Points2): pixel coordinates

  • points_I (sonic.Points3): respective 3D position objects that are used for estimation

  • method (string): “DLT” (normalized DLT)

    or “oDLT” (optimal DLT)

  • covu (OPTIONAL)
    • DEFAULT: unit variance

    • (1x1 double): isotropic variance, same for all measurements

    • (1xn double): isotropic variance of points2

  • computeCov (1x1 logical) (OPTIONAL): flag to decide whether to compute covariance or not. This will make the PnP function slightly slower. Defaults to false.

Outputs:
  • pose (sonic.Pose): camera pose

  • camera (sonic.Camera): calibrated camera

  • covVecP (12x12 double) covariance of the vectorized

camera matrix P

Last revised: 11/24/24 Last author: Sebastien Henry