public class FundamentalModel extends Object implements EstimatableModel<Point2d,Point2d>
| Modifier and Type | Class and Description |
|---|---|
static class |
FundamentalModel.EpipolarResidual
Geometric residual that sums the distance of points from the closest
epipolar line.
|
static class |
FundamentalModel.Fundamental8PtResidual
Computes the algebraic residual of the point pairs applied to the F
matrix
|
static class |
FundamentalModel.SampsonGeometricResidual
ResidualCalculator based on Sampson's geometric error. |
| Modifier and Type | Field and Description |
|---|---|
protected Jama.Matrix |
fundamental |
protected boolean |
normalise |
| Constructor and Description |
|---|
FundamentalModel()
Create a
FundamentalModel, automatically normalising data when
estimating the model |
FundamentalModel(boolean norm)
Create a
FundamentalModel with optional automatic normalisation. |
| Modifier and Type | Method and Description |
|---|---|
FundamentalModel |
clone()
Clone the model
|
void |
denormaliseFundamental(Pair<Jama.Matrix> norms)
De-normalise a fundamental estimate.
|
boolean |
estimate(List<? extends IndependentPair<Point2d,Point2d>> data)
Estimates the model from the observations in the list of data.
|
Jama.Matrix |
getF()
Get the fundamental matrix
|
int |
numItemsToEstimate() |
Point2d |
predict(Point2d data)
Uses the model to predict dependent data from an independent value.
|
void |
setF(Jama.Matrix optimised)
Set the Fundamental matrix
|
protected boolean normalise
protected Jama.Matrix fundamental
public FundamentalModel()
FundamentalModel, automatically normalising data when
estimating the modelpublic FundamentalModel(boolean norm)
FundamentalModel with optional automatic normalisation.norm - true if the data should be automatically normalised before
running the 8-point algorithmpublic boolean estimate(List<? extends IndependentPair<Point2d,Point2d>> data)
EstimatableModelEstimatableModel.numItemsToEstimate() pairs of dependent
and independent data. It may contain more, in which case the estimate
method may choose to make use of this data for validation, or obtaining a
better model by a least squares method for example.estimate in interface EstimatableModel<Point2d,Point2d>data - Data with which to estimate the modelEstimatableModel.numItemsToEstimate()public void denormaliseFundamental(Pair<Jama.Matrix> norms)
estimate(List) was
called with pre-normalised data.norms - the normalisation transformspublic Point2d predict(Point2d data)
Modelpublic int numItemsToEstimate()
numItemsToEstimate in interface EstimatableModel<Point2d,Point2d>public FundamentalModel clone()
public void setF(Jama.Matrix optimised)
optimised - public Jama.Matrix getF()