public class HomographyModel extends Object implements EstimatableModel<Point2d,Point2d>, MatrixTransformProvider
| Modifier and Type | Field and Description |
|---|---|
protected Jama.Matrix |
homography |
protected Predicate<HomographyModel> |
modelCheck |
protected boolean |
normalise |
| Constructor and Description |
|---|
HomographyModel()
Create an
HomographyModel that automatically normalises the data
given to estimate(List) to get a numerically stable estimate. |
HomographyModel(boolean norm)
Create a
HomographyModel with optional automatic normalisation. |
HomographyModel(boolean norm,
Predicate<HomographyModel> mc)
Create a
HomographyModel with optional automatic normalisation. |
HomographyModel(Predicate<HomographyModel> mc)
Create an
HomographyModel that automatically normalises the data
given to estimate(List) to get a numerically stable estimate. |
| Modifier and Type | Method and Description |
|---|---|
HomographyModel |
clone()
Clone the model
|
void |
denormaliseHomography(Pair<Jama.Matrix> normalisations)
De-normalise a homography estimate.
|
boolean |
estimate(List<? extends IndependentPair<Point2d,Point2d>> data)
DLT estimation of least-squares solution of 3D homogeneous homography
|
Jama.Matrix |
getTransform() |
int |
numItemsToEstimate() |
Point2d |
predict(Point2d data)
Uses the model to predict dependent data from an independent value.
|
void |
setTransform(Jama.Matrix matrix)
Set the transform matrix to the new one
|
protected Predicate<HomographyModel> modelCheck
protected Jama.Matrix homography
protected boolean normalise
public HomographyModel()
HomographyModel that automatically normalises the data
given to estimate(List) to get a numerically stable estimate.public HomographyModel(boolean norm)
HomographyModel with optional automatic normalisation.norm - true if the data should be automatically normalised before
running the DLT algorithmpublic HomographyModel(Predicate<HomographyModel> mc)
HomographyModel that automatically normalises the data
given to estimate(List) to get a numerically stable estimate.
The given Predicate is used by the estimate(List) method
to test whether the estimated homography is sensible.mc - the test function for sensible homographiespublic HomographyModel(boolean norm, Predicate<HomographyModel> mc)
HomographyModel with optional automatic normalisation.
The given Predicate is used by the estimate(List) method
to test whether the estimated homography is sensiblenorm - true if the data should be automatically normalised before
running the DLT algorithmmc - the test function for sensible homographiespublic HomographyModel clone()
EstimatableModelpublic Jama.Matrix getTransform()
getTransform in interface MatrixTransformProviderpublic void setTransform(Jama.Matrix matrix)
matrix - the new matrixpublic boolean estimate(List<? extends IndependentPair<Point2d,Point2d>> data)
estimate in interface EstimatableModel<Point2d,Point2d>data - Data with which to estimate the modelEstimatableModel.estimate(java.util.List)public void denormaliseHomography(Pair<Jama.Matrix> normalisations)
estimate(List) was
called with pre-normalised data.normalisations - the normalisation transformspublic int numItemsToEstimate()
numItemsToEstimate in interface EstimatableModel<Point2d,Point2d>