boofcv.alg.geo.h
Class HomographyResidualSampson
- java.lang.Object
-
- boofcv.alg.geo.h.HomographyResidualSampson
-
- All Implemented Interfaces:
- ModelObservationResidualN<org.ejml.data.DenseMatrix64F,AssociatedPair>
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 Summary
Constructors Constructor and Description HomographyResidualSampson()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcomputeJacobian(Point2D_F64 x1, Point2D_F64 x2)intcomputeResiduals(AssociatedPair p, double[] residuals, int index)Compute the residual errors for the observationdoubleerror1(double x1, double y1, double x2, double y2)x2 = H*x1doubleerror2(double x1, double y1, double x2, double y2)intgetN()The number of outputsvoidsetModel(org.ejml.data.DenseMatrix64F H)Specify the model being evaluated
-
-
-
Method Detail
-
setModel
public void setModel(org.ejml.data.DenseMatrix64F H)
Description copied from interface:ModelObservationResidualNSpecify the model being evaluated- Specified by:
setModelin interfaceModelObservationResidualN<org.ejml.data.DenseMatrix64F,AssociatedPair>- Parameters:
H- The model.
-
computeResiduals
public int computeResiduals(AssociatedPair p, double[] residuals, int index)
Description copied from interface:ModelObservationResidualNCompute the residual errors for the observation- Specified by:
computeResidualsin interfaceModelObservationResidualN<org.ejml.data.DenseMatrix64F,AssociatedPair>- Parameters:
p- Observation of point feature in two views- Returns:
- The new index. index + getN()
-
error1
public double error1(double x1, double y1, double x2, double y2)x2 = H*x1
-
error2
public double error2(double x1, double y1, double x2, double y2)
-
computeJacobian
public void computeJacobian(Point2D_F64 x1, Point2D_F64 x2)
-
getN
public int getN()
Description copied from interface:ModelObservationResidualNThe number of outputs- Specified by:
getNin interfaceModelObservationResidualN<org.ejml.data.DenseMatrix64F,AssociatedPair>- Returns:
- number of outputs
-
-
DataMelt 3.0 © DataMelt by jWork.ORG