Package boofcv.alg.structure.expand
Class EstimateViewUtils
java.lang.Object
boofcv.alg.structure.expand.EstimateViewUtils
Common operations when estimating a new view
-
Field Summary
Modifier and TypeFieldDescriptionUsed to check results to see if they can be trusteddouble
Bundle Adjustment functions and configurationsfinal RemoveBrownPtoN_F64
final RemoveBrownPtoN_F64
final RemoveBrownPtoN_F64
final List<Point2D_F64>
final DogArray_I32
final Se3_F64
final Se3_F64
final Se3_F64
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configureSbaStructure
(List<AssociatedTriple> inliersThreeView) Configures data structures for running SBA.void
copyToSolution
(PairwiseGraphUtils pairwiseUtils, MetricExpandByOneView.Solution solution) Copies the found parameters for the new view into the 'solution' object providedvoid
initialize
(boolean knownView3, SceneWorkingGraph workGraph, PairwiseGraphUtils pairwiseUtils) Initializes data structures for when a new view is being processed.boolean
performBundleAdjustment
(@Nullable PrintStream verbose) Runs bundle adjustment and optimizes the scene.boofcv.alg.structure.expand.EstimateViewUtils.RemoveResults
removedBadFeatures
(PairwiseGraphUtils utils, double fractionBadFeaturesRecover, @Nullable PrintStream verbose) Applies the physical constraints to identify bad image features.void
setCamera3
(BundlePinholeSimplified camera3) Specifies the intrinsics for view-3's camera.boolean
verifyPhysicalConstraints
(double fractionAccept, @Nullable PrintStream verbose) Inspects the observations to see if they pass a check on known constraints.
-
Field Details
-
metricSba
Bundle Adjustment functions and configurations -
usedThreeViewInliers
-
local_to_global
public double local_to_global -
normalize1
-
normalize2
-
normalize3
-
view1_to_view1
-
view1_to_view2
-
view1_to_target
-
pixelNorms
-
listMotion
-
checks
Used to check results to see if they can be trusted
-
-
Constructor Details
-
EstimateViewUtils
public EstimateViewUtils()
-
-
Method Details
-
initialize
public void initialize(boolean knownView3, SceneWorkingGraph workGraph, PairwiseGraphUtils pairwiseUtils) Initializes data structures for when a new view is being processed. The state of 'pairwiseUtils' is used to determine which views are used as input.- Parameters:
knownView3
- If true then prior information on view-3 (target view) is being used.workGraph
- The working graphpairwiseUtils
- Pairwise information and specifies which views are being considered.
-
setCamera3
Specifies the intrinsics for view-3's camera. This should be called if it's not known at the timeinitialize(boolean, boofcv.alg.structure.SceneWorkingGraph, boofcv.alg.structure.PairwiseGraphUtils)
was called.- Parameters:
camera3
- Intrinsic parameters for view-3.
-
copyToSolution
public void copyToSolution(PairwiseGraphUtils pairwiseUtils, MetricExpandByOneView.Solution solution) Copies the found parameters for the new view into the 'solution' object provided- Parameters:
pairwiseUtils
- Pairwise informationsolution
- (Output) view parameters are copied here.
-
configureSbaStructure
Configures data structures for running SBA. Which observations are used is specified by the provided inliers. By default all cameras and views are set to known. If these need to be optimized for a specific use case then 'known' should be set to false.- Parameters:
inliersThreeView
- Specifies the observations
-
performBundleAdjustment
Runs bundle adjustment and optimizes the scene.- Parameters:
verbose
- If not null, then verbose information is printed
-
removedBadFeatures
public boofcv.alg.structure.expand.EstimateViewUtils.RemoveResults removedBadFeatures(PairwiseGraphUtils utils, double fractionBadFeaturesRecover, @Nullable @Nullable PrintStream verbose) Applies the physical constraints to identify bad image features. It then removes those if there are only a few and runs bundle adjustment again. If there are no bad features then it accepts this solution.- Returns:
- true if it passes
-
verifyPhysicalConstraints
public boolean verifyPhysicalConstraints(double fractionAccept, @Nullable @Nullable PrintStream verbose) Inspects the observations to see if they pass a check on known constraints.- Parameters:
fractionAccept
- Fraction of points which can fail the test and this returns trueverbose
- If not null then verbose information will be printed- Returns:
- true if it passes the constraints check
- See Also:
-