boofcv.alg.geo.bundle
Class CalibPoseAndPointResiduals
- java.lang.Object
-
- boofcv.alg.geo.bundle.CalibPoseAndPointResiduals
-
- All Implemented Interfaces:
- FunctionNtoM
public class CalibPoseAndPointResiduals extends java.lang.Object implements FunctionNtoM
Computes residuals for bundle adjustment given known camera calibration. Cost function being optimized is specified below.
cost(P) = (1/(m*n))*∑i ∑j ||xj - (1/z)*[Ri|Ti]*Xj||2
-
-
Constructor Summary
Constructors Constructor and Description CalibPoseAndPointResiduals()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidconfigure(ModelCodec<CalibratedPoseAndPoint> codec, CalibratedPoseAndPoint model, java.util.List<ViewPointObservations> obs)Configures the residual function.intgetNumOfInputsN()Number of input elements.intgetNumOfOutputsM()Number of output elements.voidprocess(CalibratedPoseAndPoint model, double[] output)voidprocess(double[] input, double[] output)Processes the input to compute the values found in the output array.
-
-
-
Method Detail
-
configure
public void configure(ModelCodec<CalibratedPoseAndPoint> codec, CalibratedPoseAndPoint model, java.util.List<ViewPointObservations> obs)
Configures the residual function.- Parameters:
model- Model being processedcodec- Decodes parameterized version of parametersobs- Contains camera observations of each point.
-
getNumOfInputsN
public int getNumOfInputsN()
Description copied from interface:FunctionNtoMNumber of input elements. Typically the parameters you are optimizing.- Specified by:
getNumOfInputsNin interfaceFunctionNtoM- Returns:
- number of input elements
-
getNumOfOutputsM
public int getNumOfOutputsM()
Description copied from interface:FunctionNtoMNumber of output elements. Typically the functions that are being optimized.- Specified by:
getNumOfOutputsMin interfaceFunctionNtoM- Returns:
- number of output elements
-
process
public void process(double[] input, double[] output)Description copied from interface:FunctionNtoMProcesses the input to compute the values found in the output array. The output's meaning depends on the application. For least-squares it is the residual error. SeeUnconstrainedLeastSquares.The user can modify the input parameters here and the optimizer must use those changes.
- Specified by:
processin interfaceFunctionNtoM- Parameters:
input- Parameters for input model.output- Storage for the output give the model.
-
process
public void process(CalibratedPoseAndPoint model, double[] output)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG