public class DistanceSe3SymmetricSq extends java.lang.Object implements DistanceFromModelMultiView<georegression.struct.se.Se3_F64,AssociatedPair>
Computes the error for a given camera motion from two calibrated views. First a point is triangulated from the two views and the motion. Then the difference between the observed and projected point is found at each view. Error is normalized pixel difference squared.
error = Δx12 + Δy12 + Δx22 + Δy22
Error units can be in either pixels2 or unit less (normalized pixel coordinates). To compute the error in pixels pass in the correct intrinsic calibration parameters in the constructor. Otherwise pass in fx=1.fy=1,skew=0 for normalized.
NOTE: If a point does not pass the positive depth constraint then a very large error is returned.
NOTE: The provided transform must be from the key frame into the current frame.
| Constructor and Description |
|---|
DistanceSe3SymmetricSq(TriangulateTwoViewsCalibrated triangulate)
Configure distance calculation.
|
| Modifier and Type | Method and Description |
|---|---|
double |
computeDistance(AssociatedPair obs)
Computes the error given the motion model
|
void |
computeDistance(java.util.List<AssociatedPair> associatedPairs,
double[] distance) |
java.lang.Class<georegression.struct.se.Se3_F64> |
getModelType() |
int |
getNumberOfViews() |
java.lang.Class<AssociatedPair> |
getPointType() |
void |
setIntrinsic(int view,
CameraPinhole intrinsic) |
void |
setModel(georegression.struct.se.Se3_F64 keyToCurr) |
public DistanceSe3SymmetricSq(TriangulateTwoViewsCalibrated triangulate)
triangulate - Triangulates the intersection of two observationspublic void setModel(georegression.struct.se.Se3_F64 keyToCurr)
setModel in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.se.Se3_F64,AssociatedPair>public double computeDistance(AssociatedPair obs)
computeDistance in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.se.Se3_F64,AssociatedPair>obs - Observation in normalized pixel coordinatespublic void computeDistance(java.util.List<AssociatedPair> associatedPairs, double[] distance)
computeDistance in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.se.Se3_F64,AssociatedPair>public java.lang.Class<AssociatedPair> getPointType()
getPointType in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.se.Se3_F64,AssociatedPair>public java.lang.Class<georegression.struct.se.Se3_F64> getModelType()
getModelType in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.se.Se3_F64,AssociatedPair>public void setIntrinsic(int view,
CameraPinhole intrinsic)
setIntrinsic in interface DistanceFromModelMultiView<georegression.struct.se.Se3_F64,AssociatedPair>public int getNumberOfViews()
getNumberOfViews in interface DistanceFromModelMultiView<georegression.struct.se.Se3_F64,AssociatedPair>