Class LinePlaneCorrespondencePinholeCameraEstimator

java.lang.Object
com.irurueta.geometry.estimators.PinholeCameraEstimator
com.irurueta.geometry.estimators.LinePlaneCorrespondencePinholeCameraEstimator
Direct Known Subclasses:
DLTLinePlaneCorrespondencePinholeCameraEstimator, WeightedLinePlaneCorrespondencePinholeCameraEstimator

public abstract class LinePlaneCorrespondencePinholeCameraEstimator extends PinholeCameraEstimator
This file contains abstract implementation for pinhole camera estimators based on line/plane correspondences.
  • Field Details

    • MIN_NUMBER_OF_LINE_PLANE_CORRESPONDENCES

      public static final int MIN_NUMBER_OF_LINE_PLANE_CORRESPONDENCES
      Minimum number of required line/plane correspondences to estimate a camera.
      See Also:
    • planes

      protected List<Plane> planes
      List of corresponding 3D planes.
    • lines2D

      protected List<Line2D> lines2D
      List of corresponding 2D lines.
  • Constructor Details

    • LinePlaneCorrespondencePinholeCameraEstimator

      protected LinePlaneCorrespondencePinholeCameraEstimator()
      Constructor.
    • LinePlaneCorrespondencePinholeCameraEstimator

      protected LinePlaneCorrespondencePinholeCameraEstimator(PinholeCameraEstimatorListener listener)
      Constructor.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or estimation progress changes.
    • LinePlaneCorrespondencePinholeCameraEstimator

      protected LinePlaneCorrespondencePinholeCameraEstimator(List<Plane> planes, List<Line2D> lines2D) throws WrongListSizesException
      Constructor.
      Parameters:
      planes - list of corresponding 3D planes.
      lines2D - list of corresponding 2D lines.
      Throws:
      IllegalArgumentException - if any of the lists are null.
      WrongListSizesException - if provided lists of points don't have the same size and enough correspondences.
    • LinePlaneCorrespondencePinholeCameraEstimator

      protected LinePlaneCorrespondencePinholeCameraEstimator(List<Plane> planes, List<Line2D> lines2D, PinholeCameraEstimatorListener listener) throws WrongListSizesException
      Constructor.
      Parameters:
      planes - list of corresponding 3D planes.
      lines2D - list of corresponding 2D lines.
      listener - listener to be notified of events such as when estimation starts, ends or estimation progress changes.
      Throws:
      IllegalArgumentException - if any of the lists are null.
      WrongListSizesException - if provided lists of points don't have the same size and enough correspondences.
  • Method Details

    • internalSetLists

      private void internalSetLists(List<Plane> planes, List<Line2D> lines2D) throws WrongListSizesException
      Internal method to set list of corresponding lines/planes (it does not check if estimator is locked).
      Parameters:
      planes - list of corresponding 3D planes.
      lines2D - list of corresponding 2D lines.
      Throws:
      IllegalArgumentException - if any of the lists are null.
      WrongListSizesException - if provided lists of points don't have the same size and enough correspondences.
    • setLists

      public void setLists(List<Plane> planes, List<Line2D> lines2D) throws LockedException, WrongListSizesException
      Set list of corresponding lines/planes.
      Parameters:
      planes - list of corresponding 3D planes.
      lines2D - list of corresponding 2D lines.
      Throws:
      LockedException - if estimator is locked.
      IllegalArgumentException - if any of the lists are null.
      WrongListSizesException - if provided lists of points don't have the same size and enough correspondences.
    • getPlanes

      public List<Plane> getPlanes() throws NotAvailableException
      Returns list of corresponding lines/planes. Notice that this method returns an unmodifiable list of planes to avoid undesired modifications.
      Returns:
      list of corresponding 3D planes.
      Throws:
      NotAvailableException - if list of planes is not yet available.
    • getLines2D

      public List<Line2D> getLines2D() throws NotAvailableException
      Returns list of corresponding 2D lines. Notice that this method returns an unmodifiable list of 2D lines to avoid undesired modifications.
      Returns:
      list of corresponding 2D lines.
      Throws:
      NotAvailableException - if list of 2D lines is not yet available.
    • areValidLists

      public static boolean areValidLists(List<Plane> planes, List<Line2D> lines2D)
      Indicates if lists of corresponding 2D lines and planes are valid. Lists are considered valid if they have the same number of points and both have more than the required minimum of correspondences (which is 4).
      Parameters:
      planes - list of corresponding 3D planes.
      lines2D - list of corresponding 2D lines.
      Returns:
      true if corresponding 2D lines and planes are valid, false otherwise.
    • areListsAvailable

      public boolean areListsAvailable()
      Indicates if lists have already been provided and are available for retrieval.
      Returns:
      true if available, false otherwise.
    • attemptRefine

      protected PinholeCamera attemptRefine(PinholeCamera pinholeCamera)
      Attempts to refine provided camera using requested suggestions. If no suggestions are requested or if refinement fails, provided camera is returned instead.
      Specified by:
      attemptRefine in class PinholeCameraEstimator
      Parameters:
      pinholeCamera - camera to be refined.
      Returns:
      refined camera.