Package boofcv.abst.geo.bundle
Class BundleAdjustmentSchur<Structure extends SceneStructure,M extends DMatrix>
java.lang.Object
boofcv.abst.geo.bundle.BundleAdjustmentSchur<Structure,M>
- All Implemented Interfaces:
BundleAdjustment<Structure>
,Stoppable
,VerbosePrint
- Direct Known Subclasses:
BundleAdjustmentSchur_DDRM
,BundleAdjustmentSchur_DSCC
public class BundleAdjustmentSchur<Structure extends SceneStructure,M extends DMatrix>
extends Object
implements BundleAdjustment<Structure>
Implementation of bundle adjustment using Shur Complement and generic sparse matrices.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
BundleAdjustmentSchur.Jacobian<Structure extends SceneStructure,
M extends DMatrix> Nested classes/interfaces inherited from interface org.ddogleg.struct.Stoppable
Stoppable.Stopped
-
Constructor Summary
ConstructorDescriptionBundleAdjustmentSchur
(UnconstrainedLeastSquaresSchur<M> minimizer, BundleAdjustmentSchur.FunctionResiduals<Structure> function, BundleAdjustmentSchur.Jacobian<Structure, M> jacobian, BundleAdjustmentSchur.Codec<Structure> codec) -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(double ftol, double gtol, int maxIterations) Configures optimization parameters.double
Returns the fit score.boolean
boolean
Optimises the parameters contained in 'structure' to minimize the error in the 'observations'.void
void
setParameters
(Structure structure, SceneObservations observations) Specifies the optimization parameters.void
setVerbose
(@Nullable PrintStream out, @Nullable Set<String> configuration)
-
Constructor Details
-
BundleAdjustmentSchur
public BundleAdjustmentSchur(UnconstrainedLeastSquaresSchur<M> minimizer, BundleAdjustmentSchur.FunctionResiduals<Structure> function, BundleAdjustmentSchur.Jacobian<Structure, M> jacobian, BundleAdjustmentSchur.Codec<Structure> codec)
-
-
Method Details
-
configure
public void configure(double ftol, double gtol, int maxIterations) Description copied from interface:BundleAdjustment
Configures optimization parameters. meaning of all of these parameters is implementation dependent. They might even be ignored.- Specified by:
configure
in interfaceBundleAdjustment<Structure extends SceneStructure>
- Parameters:
ftol
- Relative threshold for change in function value between iterations. 0 ≤ ftol ≤ 1. Try 1e-12gtol
- Absolute threshold for convergence based on the gradient's norm. 0 disables test. 0 ≤ gtol. Try 1e-12maxIterations
- Maximum number of iterations.
-
setParameters
Description copied from interface:BundleAdjustment
Specifies the optimization parameters. After this the initial fit score will return a valid value.- Specified by:
setParameters
in interfaceBundleAdjustment<Structure extends SceneStructure>
- Parameters:
structure
- Input: Initial parameters. Output: Optimized parametersobservations
- Observation of features in each image.
-
optimize
Description copied from interface:BundleAdjustment
Optimises the parameters contained in 'structure' to minimize the error in the 'observations'. This function call will block until complete. Output is written back into 'structure'- Specified by:
optimize
in interfaceBundleAdjustment<Structure extends SceneStructure>
- Parameters:
output
- Storage for optimized parameters. Can be the same structure passed intoBundleAdjustment.setParameters(Structure, boofcv.abst.geo.bundle.SceneObservations)
.- Returns:
- true If the cost function has been improved. If the data is perfect to start with this will return false since it has not improved
-
getFitScore
public double getFitScore()Description copied from interface:BundleAdjustment
Returns the fit score. Meaning is implementation specific.- Specified by:
getFitScore
in interfaceBundleAdjustment<Structure extends SceneStructure>
- Returns:
- score
-
requestStop
public void requestStop()- Specified by:
requestStop
in interfaceStoppable
-
isStopRequested
public boolean isStopRequested()- Specified by:
isStopRequested
in interfaceStoppable
-
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbose
in interfaceVerbosePrint
-