Package boofcv.alg.geo.bundle
Class BundleAdjustmentMetricResidualFunction
java.lang.Object
boofcv.alg.geo.bundle.BundleAdjustmentMetricResidualFunction
- All Implemented Interfaces:
BundleAdjustmentSchur.FunctionResiduals<SceneStructureMetric>
,FunctionInOut
,FunctionNtoM
public class BundleAdjustmentMetricResidualFunction
extends Object
implements BundleAdjustmentSchur.FunctionResiduals<SceneStructureMetric>
Computes observations errors/residuals for metric bundle adjustment as implemented using
UnconstrainedLeastSquares
. Parameterization is done using
the format in CodecSceneStructureMetric
.
cost(P) = (1/(m*n))*∑i ∑j ||xj - (1/z)*[Ri|Ti]*Xj||2
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(SceneStructureMetric structure, SceneObservations observations) Specifies the scenes structure and observed feature locationsint
int
protected Se3_F64
Returns a transform from the world_to_view.void
process
(double[] output) Computes the residuals and skips decoding the current parameters.void
process
(double[] input, double[] output)
-
Constructor Details
-
BundleAdjustmentMetricResidualFunction
public BundleAdjustmentMetricResidualFunction()
-
-
Method Details
-
configure
Specifies the scenes structure and observed feature locations- Specified by:
configure
in interfaceBundleAdjustmentSchur.FunctionResiduals<SceneStructureMetric>
-
getNumOfInputsN
public int getNumOfInputsN()- Specified by:
getNumOfInputsN
in interfaceFunctionInOut
-
getNumOfOutputsM
public int getNumOfOutputsM()- Specified by:
getNumOfOutputsM
in interfaceFunctionInOut
-
process
public void process(double[] input, double[] output) - Specified by:
process
in interfaceFunctionNtoM
-
process
public void process(double[] output) Computes the residuals and skips decoding the current parameters. Useful when you are using this to compute the residuals and not optimizing -
lookupWorldToView
Returns a transform from the world_to_view. If relative then the parent's world to view is look up and used to compute this view's transform and the results are saved.
-