public class HomographyResidualSampson extends java.lang.Object implements ModelObservationResidualN<org.ejml.data.DenseMatrix64F,AssociatedPair>
Computes the Sampson distance residual for a set of observations given a homography matrix. For use in least-squares non-linear optimization algorithms. The full 9 elements of the 3x3 matrix are used to parameterize. This has an extra redundant parameter, but is much simpler and should not affect the final result.
R. Hartley, and A. Zisserman, "Multiple View Geometry in Computer Vision", 2nd Ed, Cambridge 2003
| Constructor and Description |
|---|
HomographyResidualSampson() |
| Modifier and Type | Method and Description |
|---|---|
void |
computeJacobian(georegression.struct.point.Point2D_F64 x1,
georegression.struct.point.Point2D_F64 x2) |
int |
computeResiduals(AssociatedPair p,
double[] residuals,
int index)
Compute the residual errors for the observation
|
double |
error1(double x1,
double y1,
double x2,
double y2)
x2 = H*x1
|
double |
error2(double x1,
double y1,
double x2,
double y2) |
int |
getN()
The number of outputs
|
void |
setModel(org.ejml.data.DenseMatrix64F H)
Specify the model being evaluated
|
public void setModel(org.ejml.data.DenseMatrix64F H)
ModelObservationResidualNsetModel in interface ModelObservationResidualN<org.ejml.data.DenseMatrix64F,AssociatedPair>H - The model.public int computeResiduals(AssociatedPair p, double[] residuals, int index)
ModelObservationResidualNcomputeResiduals in interface ModelObservationResidualN<org.ejml.data.DenseMatrix64F,AssociatedPair>p - Observation of point feature in two viewspublic double error1(double x1,
double y1,
double x2,
double y2)
public double error2(double x1,
double y1,
double x2,
double y2)
public void computeJacobian(georegression.struct.point.Point2D_F64 x1,
georegression.struct.point.Point2D_F64 x2)
public int getN()
ModelObservationResidualNgetN in interface ModelObservationResidualN<org.ejml.data.DenseMatrix64F,AssociatedPair>