Class CameraPoseEstimator

java.lang.Object
com.irurueta.ar.calibration.estimators.CameraPoseEstimator

public class CameraPoseEstimator extends Object
Estimates the camera pose for a given homography and pinhole camera intrinsic parameters.

This class is used for camera calibration but can also be used for virtual reality applications This class assumes that the homography is estimated as the result of projecting 3D points located in a plane.

This class is based on technique described at: Zhengyou Zhang. A Flexible New Technique for Camera Calibration. Technical Report. MSR-TR-98-71. December 2, 1998

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private com.irurueta.geometry.PinholeCamera
    Estimated camera.
    private com.irurueta.geometry.Point3D
    Estimated camera center.
    private com.irurueta.geometry.Rotation3D
    Estimated camera rotation.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    estimate(com.irurueta.geometry.PinholeCameraIntrinsicParameters intrinsic, com.irurueta.geometry.Transformation2D homography)
    Estimates camera posed based on provided intrinsic parameters and 2D homography.
    static void
    estimate(com.irurueta.geometry.PinholeCameraIntrinsicParameters intrinsic, com.irurueta.geometry.Transformation2D homography, com.irurueta.geometry.Rotation3D estimatedRotation, com.irurueta.geometry.Point3D estimatedCameraCenter, com.irurueta.geometry.PinholeCamera estimatedCamera)
    Estimates camera pose based on provided intrinsic parameters and 2D homography.
    com.irurueta.geometry.PinholeCamera
    Returns estimated camera.
    com.irurueta.geometry.Point3D
    Returns estimated camera center.
    com.irurueta.geometry.Rotation3D
    Returns estimated camera rotation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • rotation

      private com.irurueta.geometry.Rotation3D rotation
      Estimated camera rotation.
    • cameraCenter

      private com.irurueta.geometry.Point3D cameraCenter
      Estimated camera center.
    • camera

      private com.irurueta.geometry.PinholeCamera camera
      Estimated camera.
  • Constructor Details

    • CameraPoseEstimator

      public CameraPoseEstimator()
  • Method Details

    • estimate

      public void estimate(com.irurueta.geometry.PinholeCameraIntrinsicParameters intrinsic, com.irurueta.geometry.Transformation2D homography) throws com.irurueta.algebra.AlgebraException, com.irurueta.geometry.GeometryException
      Estimates camera posed based on provided intrinsic parameters and 2D homography.
      Parameters:
      intrinsic - pinhole camera intrinsic parameters.
      homography - a 2D homography.
      Throws:
      com.irurueta.algebra.AlgebraException - if provided data is numerically unstable.
      com.irurueta.geometry.GeometryException - if a proper camera rotation cannot be found.
    • getRotation

      public com.irurueta.geometry.Rotation3D getRotation()
      Returns estimated camera rotation.
      Returns:
      estimated camera rotation.
    • getCameraCenter

      public com.irurueta.geometry.Point3D getCameraCenter()
      Returns estimated camera center.
      Returns:
      estimated camera center.
    • getCamera

      public com.irurueta.geometry.PinholeCamera getCamera()
      Returns estimated camera.
      Returns:
      estimated camera.
    • estimate

      public static void estimate(com.irurueta.geometry.PinholeCameraIntrinsicParameters intrinsic, com.irurueta.geometry.Transformation2D homography, com.irurueta.geometry.Rotation3D estimatedRotation, com.irurueta.geometry.Point3D estimatedCameraCenter, com.irurueta.geometry.PinholeCamera estimatedCamera) throws com.irurueta.algebra.AlgebraException, com.irurueta.geometry.GeometryException
      Estimates camera pose based on provided intrinsic parameters and 2D homography.
      Parameters:
      intrinsic - pinhole camera intrinsic parameters.
      homography - a 2D homography.
      estimatedRotation - instance where estimated rotation will be stored.
      estimatedCameraCenter - instance where estimated camera center will be stored.
      estimatedCamera - instance where estimated camera will be stored.
      Throws:
      com.irurueta.algebra.AlgebraException - if provided data is numerically unstable.
      com.irurueta.geometry.GeometryException - if a proper camera rotation cannot be found.