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
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfaceBundleAdjustmentSchur.Jacobian<Structure extends SceneStructure,M extends DMatrix> Nested classes/interfaces inherited from interface org.ddogleg.struct.Stoppable
Stoppable.Stopped -
Constructor Summary
ConstructorsConstructorDescriptionBundleAdjustmentSchur(UnconstrainedLeastSquaresSchur<M> minimizer, BundleAdjustmentSchur.FunctionResiduals<Structure> function, BundleAdjustmentSchur.Jacobian<Structure, M> jacobian, BundleAdjustmentSchur.Codec<Structure> codec) -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(double ftol, double gtol, int maxIterations) Configures optimization parameters.doubleReturns the fit score.booleanbooleanOptimises the parameters contained in 'structure' to minimize the error in the 'observations'.voidvoidsetParameters(Structure structure, SceneObservations observations) Specifies the optimization parameters.voidsetVerbose(@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:BundleAdjustmentConfigures optimization parameters. meaning of all of these parameters is implementation dependent. They might even be ignored.- Specified by:
configurein 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:BundleAdjustmentSpecifies the optimization parameters. After this the initial fit score will return a valid value.- Specified by:
setParametersin interfaceBundleAdjustment<Structure extends SceneStructure>- Parameters:
structure- Input: Initial parameters. Output: Optimized parametersobservations- Observation of features in each image.
-
optimize
Description copied from interface:BundleAdjustmentOptimises 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:
optimizein 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:BundleAdjustmentReturns the fit score. Meaning is implementation specific.- Specified by:
getFitScorein interfaceBundleAdjustment<Structure extends SceneStructure>- Returns:
- score
-
requestStop
public void requestStop()- Specified by:
requestStopin interfaceStoppable
-
isStopRequested
public boolean isStopRequested()- Specified by:
isStopRequestedin interfaceStoppable
-
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbosein interfaceVerbosePrint
-