Package boofcv.alg.structure
Class SelectNeighborsAroundView
java.lang.Object
boofcv.alg.structure.SelectNeighborsAroundView
- All Implemented Interfaces:
VerbosePrint
Selects a subset of views from a
SceneWorkingGraph
as the first step before performing local bundle
adjustment. The goal is to select the subset of views which would contribute the most to the target view's
state estimate. To keep computational limits in check the user needs to specifies a maximum number of views.
Every connection between views is assigned a score. The goal is to find the subset of views which maximizes
the minimum score across all connections between views. This is approximated using the greedy algorithm below:
Summary:
- Set of views will be the target's neighbors and their neighbors
- Create a list of all edges and their scores that connect these
- Repeat the loop below until only N views remain
- Select the edge with the lowest score
- Pick one of the views it is connected to be prune based on their connections
- Remove the view and all the edges connected to it
minimum number
that must remain at the end. If all neighbors are removed then there is the possibility that all the remaining
nodes will not see the same features as the target.
WARNING: There is a known flaw where a multiple disconnected graphs can be created in a poorly connected graph
-
Field Summary
Modifier and TypeFieldDescriptionprotected final SceneWorkingGraph
Copy of the local scene which can be independently optimizedint
Moving number of views in the constructed working graph.int
There should be at least this number of direct neighbors in the final listint
When a view is scored for removal the N-worstOfTop connection is used for the score. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
process
(SceneWorkingGraph.View target, SceneWorkingGraph working) Computes a local graph with the view as a seed.void
setVerbose
(@Nullable PrintStream out, @Nullable Set<String> configuration)
-
Field Details
-
maxViews
public int maxViewsMoving number of views in the constructed working graph. -
worstOfTop
public int worstOfTopWhen a view is scored for removal the N-worstOfTop connection is used for the score. -
minNeighbors
public int minNeighborsThere should be at least this number of direct neighbors in the final list -
localWorking
Copy of the local scene which can be independently optimized
-
-
Constructor Details
-
SelectNeighborsAroundView
public SelectNeighborsAroundView()
-
-
Method Details
-
process
Computes a local graph with the view as a seed. Local graph can be accessed by calling#getLocalWorking()
- Parameters:
target
- (Input) The view in 'working' that a local graph is to be built aroundworking
- (Input) A graph of the entire scene that a sub graph is to be made from
-
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbose
in interfaceVerbosePrint
-