Class EstimateViewUtils

java.lang.Object
boofcv.alg.structure.expand.EstimateViewUtils

public class EstimateViewUtils extends Object
Common operations when estimating a new view
  • Field Details

  • Constructor Details

    • EstimateViewUtils

      public EstimateViewUtils()
  • Method Details

    • initialize

      public void initialize(boolean knownView3, SceneWorkingGraph workGraph, PairwiseGraphUtils pairwiseUtils)
      Initializes data structures for when a new view is being processed. The state of 'pairwiseUtils' is used to determine which views are used as input.
      Parameters:
      knownView3 - If true then prior information on view-3 (target view) is being used.
      workGraph - The working graph
      pairwiseUtils - Pairwise information and specifies which views are being considered.
    • setCamera3

      public void setCamera3(BundlePinholeSimplified camera3)
      Specifies the intrinsics for view-3's camera. This should be called if it's not known at the time initialize(boolean, boofcv.alg.structure.SceneWorkingGraph, boofcv.alg.structure.PairwiseGraphUtils) was called.
      Parameters:
      camera3 - Intrinsic parameters for view-3.
    • copyToSolution

      public void copyToSolution(PairwiseGraphUtils pairwiseUtils, MetricExpandByOneView.Solution solution)
      Copies the found parameters for the new view into the 'solution' object provided
      Parameters:
      pairwiseUtils - Pairwise information
      solution - (Output) view parameters are copied here.
    • configureSbaStructure

      public void configureSbaStructure(List<AssociatedTriple> inliersThreeView)
      Configures data structures for running SBA. Which observations are used is specified by the provided inliers. By default all cameras and views are set to known. If these need to be optimized for a specific use case then 'known' should be set to false.
      Parameters:
      inliersThreeView - Specifies the observations
    • performBundleAdjustment

      public boolean performBundleAdjustment(@Nullable @Nullable PrintStream verbose)
      Runs bundle adjustment and optimizes the scene.
      Parameters:
      verbose - If not null, then verbose information is printed
    • removedBadFeatures

      public boofcv.alg.structure.expand.EstimateViewUtils.RemoveResults removedBadFeatures(PairwiseGraphUtils utils, double fractionBadFeaturesRecover, @Nullable @Nullable PrintStream verbose)
      Applies the physical constraints to identify bad image features. It then removes those if there are only a few and runs bundle adjustment again. If there are no bad features then it accepts this solution.
      Returns:
      true if it passes
    • verifyPhysicalConstraints

      public boolean verifyPhysicalConstraints(double fractionAccept, @Nullable @Nullable PrintStream verbose)
      Inspects the observations to see if they pass a check on known constraints.
      Parameters:
      fractionAccept - Fraction of points which can fail the test and this returns true
      verbose - If not null then verbose information will be printed
      Returns:
      true if it passes the constraints check
      See Also: