Class UtilLepetitEPnP

java.lang.Object
boofcv.alg.geo.pose.UtilLepetitEPnP

public class UtilLepetitEPnP extends Object
Various utility functions for PnPLepetitEPnP.
  • Constructor Details

    • UtilLepetitEPnP

      public UtilLepetitEPnP()
  • Method Details

    • computeCameraControl

      public static void computeCameraControl(double[] beta, List<Point3D_F64>[] nullPts, DogArray<Point3D_F64> cameraPts, int numControl)
      Computes the camera control points as weighted sum of null points.
      Parameters:
      beta - Beta values which describe the weights of null points
      nullPts - Null points that the camera point is a weighted sum of
      cameraPts - The output
    • constraintMatrix6x4

      public static void constraintMatrix6x4(DMatrixRMaj L_6x10, DMatrixRMaj L_6x4)
      Extracts the linear constraint matrix for case 1 from the full 6x10 constraint matrix.
    • constraintMatrix6x3

      public static void constraintMatrix6x3(DMatrixRMaj L_6x10, DMatrixRMaj L_6x3)
      Extracts the linear constraint matrix for case 2 from the full 6x10 constraint matrix.
    • constraintMatrix6x6

      public static void constraintMatrix6x6(DMatrixRMaj L_6x10, DMatrixRMaj L_6x6)
      Extracts the linear constraint matrix for case 3 from the full 6x10 constraint matrix.
    • constraintMatrix6x10

      public static void constraintMatrix6x10(DMatrixRMaj L, DMatrixRMaj y, DogArray<Point3D_F64> controlWorldPts, List<Point3D_F64>[] nullPts)
      Linear constraint matrix used in case 4 in the general case
      Parameters:
      L - Constraint matrix
      y - Vector containing distance between world control points
      controlWorldPts - List of world control points
      nullPts - Null points
    • constraintMatrix3x3a

      public static void constraintMatrix3x3a(DMatrixRMaj L_3x6, DMatrixRMaj L_3x3)
      Extracts the linear constraint matrix for case 1 from the full 6x10 constraint matrix.
    • constraintMatrix3x3

      public static void constraintMatrix3x3(DMatrixRMaj L_3x6, DMatrixRMaj L_6x3)
      Extracts the linear constraint matrix for planar case 2 from the full 4x6 constraint matrix.
    • constraintMatrix3x6

      public static void constraintMatrix3x6(DMatrixRMaj L, DMatrixRMaj y, DogArray<Point3D_F64> controlWorldPts, List<Point3D_F64>[] nullPts)
      Linear constraint matrix for case 4 in the planar case
      Parameters:
      L - Constraint matrix
      y - Vector containing distance between world control points
      controlWorldPts - List of world control points
      nullPts - Null points
    • residuals_Control4

      public static void residuals_Control4(DMatrixRMaj L_full, DMatrixRMaj y, double[] beta, double[] r)
      Computes the residuals (difference between observed and predicted) given 4 control points.
    • residuals_Control3

      public static void residuals_Control3(DMatrixRMaj L_full, DMatrixRMaj y, double[] beta, double[] r)
      Computes the residuals (difference between observed and predicted given 3 control points.
    • jacobian_Control4

      public static void jacobian_Control4(DMatrixRMaj L_full, double[] beta, DMatrixRMaj A)
      Computes the Jacobian given 4 control points.
    • jacobian_Control3

      public static void jacobian_Control3(DMatrixRMaj L_full, double[] beta, DMatrixRMaj A)
      Computes the Jacobian given 3 control points.