Class PruneStructureFromSceneMetric


  • public class PruneStructureFromSceneMetric
    extends java.lang.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.
    • Method Detail

      • 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 void pruneViews​(int count)
        Removes views with less than 'count' features visible. Observations of features in removed views are also removed.
        Parameters:
        count - Prune if it has this number of views or less
      • pruneUnusedCameras

        public void pruneUnusedCameras()
        Prunes cameras that are not referenced by any views.