Package boofcv.alg.structure
Class ReconstructionFromPairwiseGraph
java.lang.Object
boofcv.alg.structure.ReconstructionFromPairwiseGraph
- All Implemented Interfaces:
VerbosePrint
- Direct Known Subclasses:
MetricFromUncalibratedPairwiseGraph
Contains common functions useful for perform a full scene reconstruction from a
PairwiseImageGraph
.
This includes selecting the seed views, selecting next views to expand to, and boiler plate.- See Also:
-
MetricFromUncalibratedPairwiseGraph
ProjectiveReconstructionFromPairwiseGraph
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Contains information on a potential expansionprotected static class
Information related to a view acting as a seed to spawn a projective graph -
Field Summary
Modifier and TypeFieldDescriptionfinal ConfigLength
It will stop spawning more seeds when it fails this many times.protected PairwiseGraphUtils
protected @Nullable PrintStream
-
Constructor Summary
ModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addOpenForView
(SceneWorkingGraph scene, PairwiseImageGraph.View view) Adds connections to the passed in view to the list of views to explore.protected void
Searches all connections to known views and creates a list of connected views which have a 3D relationshipprotected Map<String,
ReconstructionFromPairwiseGraph.SeedInfo> scoreNodesAsSeeds
(PairwiseImageGraph graph, int maxMotions) Considers every view in the graph as a potential seed and computes their scoresprotected ReconstructionFromPairwiseGraph.SeedInfo
scoreSeedAndSelectSet
(PairwiseImageGraph.View target, int maxMotions, ReconstructionFromPairwiseGraph.SeedInfo output) Scores how the target as a seed and selects the initial set of views it should spawn from.protected void
selectAndSpawnSeeds
(LookUpSimilarImages dbSimilar, LookUpCameraInfo dbCams, PairwiseImageGraph pairwise, DogArray<ReconstructionFromPairwiseGraph.SeedInfo> candidates, Map<String, ReconstructionFromPairwiseGraph.SeedInfo> lookupInfo) Goes through every candidate for a seed and greedily selects the ones with the best score.protected boolean
selectNextToProcess
(SceneWorkingGraph scene, ReconstructionFromPairwiseGraph.Expansion selection) Selects next View to process based on the score of it's known connections.void
setVerbose
(@Nullable PrintStream out, @Nullable Set<String> configuration) protected abstract boolean
spawnSceneFromSeed
(LookUpSimilarImages dbSimilar, LookUpCameraInfo dbCams, PairwiseImageGraph pairwise, ReconstructionFromPairwiseGraph.SeedInfo info) Attempts to create a scene from the passed in seed.
-
Field Details
-
maximumSeedFailures
It will stop spawning more seeds when it fails this many times. If relative, then its relative to the maximum number of candidate views for seeds. -
utils
-
verbose
-
scoresMotions
-
-
Constructor Details
-
ReconstructionFromPairwiseGraph
-
-
Method Details
-
findAllOpenViews
Searches all connections to known views and creates a list of connected views which have a 3D relationship -
addOpenForView
Adds connections to the passed in view to the list of views to explore. Care is taken to not add the same view more than once- Parameters:
view
- (Input) Inspects connected views to add to found
-
selectNextToProcess
protected boolean selectNextToProcess(SceneWorkingGraph scene, ReconstructionFromPairwiseGraph.Expansion selection) Selects next View to process based on the score of it's known connections. Two connections which both connect to each other is required.- Parameters:
selection
- The results- Returns:
- true if a valid choice was found. Otherwise false.
-
scoreNodesAsSeeds
protected Map<String,ReconstructionFromPairwiseGraph.SeedInfo> scoreNodesAsSeeds(PairwiseImageGraph graph, int maxMotions) Considers every view in the graph as a potential seed and computes their scores -
selectAndSpawnSeeds
protected void selectAndSpawnSeeds(LookUpSimilarImages dbSimilar, LookUpCameraInfo dbCams, PairwiseImageGraph pairwise, DogArray<ReconstructionFromPairwiseGraph.SeedInfo> candidates, Map<String, ReconstructionFromPairwiseGraph.SeedInfo> lookupInfo) Goes through every candidate for a seed and greedily selects the ones with the best score. It then attempts a metric upgrade. If successful it then uses that as a seed and marks all of its neighbors so that they are not selected as seeds themselves.- Parameters:
candidates
- (input) All the candidate views for seedslookupInfo
- (input) Used to lookup SeedInfo by View ID
-
spawnSceneFromSeed
protected abstract boolean spawnSceneFromSeed(LookUpSimilarImages dbSimilar, LookUpCameraInfo dbCams, PairwiseImageGraph pairwise, ReconstructionFromPairwiseGraph.SeedInfo info) Attempts to create a scene from the passed in seed. If successful this function needs to add it to the list of scenes. If it fails then there should be no change.- Parameters:
info
- Seed for a new scene- Returns:
- true if successful or false if it failed
-
scoreSeedAndSelectSet
protected ReconstructionFromPairwiseGraph.SeedInfo scoreSeedAndSelectSet(PairwiseImageGraph.View target, int maxMotions, ReconstructionFromPairwiseGraph.SeedInfo output) Scores how the target as a seed and selects the initial set of views it should spawn from. -
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbose
in interfaceVerbosePrint
-