Package boofcv.abst.geo.bundle
Class PruneStructureFromSceneMetric
- java.lang.Object
-
- boofcv.abst.geo.bundle.PruneStructureFromSceneMetric
-
public class PruneStructureFromSceneMetric extends java.lang.Objectmakes 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 Summary
Constructors Constructor Description PruneStructureFromSceneMetric(SceneStructureMetric structure, SceneObservations observations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpruneObservationsBehindCamera()Check to see if a point is behind the camera which is viewing it.voidpruneObservationsByErrorRank(double inlierFraction)Computes reprojection error for all features.voidprunePoints(int count)Prunes Points/features with less than 'count' observations.voidprunePoints(int neighbors, double distance)Prune a feature it has fewer than X neighbors within Y distance.voidpruneUnusedCameras()Prunes cameras that are not referenced by any views.voidpruneViews(int count)Removes views with less than 'count' features visible.
-
-
-
Constructor Detail
-
PruneStructureFromSceneMetric
public PruneStructureFromSceneMetric(SceneStructureMetric structure, SceneObservations observations)
-
-
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 callprunePoints(int)andpruneViews(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. CallpruneViews(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. CallpruneViews(int)to makes sure the graph is valid.- Parameters:
neighbors- Number of other features which need to be near bydistance- 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.
-
-