Class PruneStructureFromSceneMetric

java.lang.Object
boofcv.abst.geo.bundle.PruneStructureFromSceneMetric

public class PruneStructureFromSceneMetric
extends Object
makes it easy to removing elements from the scene's structure. Different criteria can be specified for each type of element you wish to remove.
  • Constructor Details

  • Method Details

    • pruneObservationsByErrorRank

      public void pruneObservationsByErrorRank​(double inlierFraction)
      Computes reprojection error for all features. Sorts the resulting residuals by magnitude. Prunes observations which have the largest errors first. After calling this function you should call prunePoints(int) and pruneViews(int) to ensure the scene is still valid.
      Parameters:
      inlierFraction - Fraction of observations to keep. 0 to 1. 1 = no change. 0 = everything is pruned.
    • pruneObservationsBehindCamera

      public void pruneObservationsBehindCamera()
      Check to see if a point is behind the camera which is viewing it. If it is remove that observation since it can't possibly be observed.
    • prunePoints

      public void prunePoints​(int count)
      Prunes Points/features with less than 'count' observations. Observations of the points are also removed. Call pruneViews(int) to ensure that all views have points in view
      Parameters:
      count - Minimum number of observations
    • prunePoints

      public void prunePoints​(int neighbors, double distance)
      Prune a feature it has fewer than X neighbors within Y distance. Observations associated with this feature are also pruned. Call pruneViews(int) to makes sure the graph is valid.
      Parameters:
      neighbors - Number of other features which need to be near by
      distance - Maximum distance a point can be to be considered a feature
    • pruneViews

      public boolean pruneViews​(int count)
      Removes views with less than or equal to 'count' features visible. Observations of features in removed views are also removed. Views which are parents (after children than can be removed have been removed) will remain since they are needed for the correct transform.
      Parameters:
      count - Prune if less than or equal to this many features
      Returns:
      true if the graph has been modified
    • pruneUnusedCameras

      public boolean pruneUnusedCameras()
      Prunes cameras that are not referenced by any views.
      Returns:
      true if the graph has been modified
    • pruneUnusedMotions

      public boolean pruneUnusedMotions()
      Prunes Motions that are not referenced by any views.
      Returns:
      true if the graph has been modified