Class DistanceSe3SymmetricSq
- All Implemented Interfaces:
DistanceFromModelMultiView<Se3_F64,
,AssociatedPair> DistanceFromModel<Se3_F64,
AssociatedPair>
Computes the error for a given camera motion from two calibrated views. First a point is triangulated in homogenous coordinates 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
Homogenous coordinates are used so that pure/nearly pure rotation can be handled. Points will be at infinity.
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 Summary
ConstructorDescriptionDistanceSe3SymmetricSq
(Triangulate2ViewsMetricH triangulator) Configure distance calculation. -
Method Summary
Modifier and TypeMethodDescriptiondouble
distance
(AssociatedPair obs) Computes the error given the motion modelvoid
distances
(List<AssociatedPair> associatedPairs, double[] distance) int
void
setIntrinsic
(int view, CameraPinhole intrinsic) void
-
Constructor Details
-
DistanceSe3SymmetricSq
Configure distance calculation.- Parameters:
triangulator
- Triangulates the intersection of two observations
-
-
Method Details
-
setModel
- Specified by:
setModel
in interfaceDistanceFromModel<Se3_F64,
AssociatedPair>
-
distance
Computes the error given the motion model- Specified by:
distance
in interfaceDistanceFromModel<Se3_F64,
AssociatedPair> - Parameters:
obs
- Observation in normalized pixel coordinates- Returns:
- observation error
-
distances
- Specified by:
distances
in interfaceDistanceFromModel<Se3_F64,
AssociatedPair>
-
getPointType
- Specified by:
getPointType
in interfaceDistanceFromModel<Se3_F64,
AssociatedPair>
-
getModelType
- Specified by:
getModelType
in interfaceDistanceFromModel<Se3_F64,
AssociatedPair>
-
setIntrinsic
- Specified by:
setIntrinsic
in interfaceDistanceFromModelMultiView<Se3_F64,
AssociatedPair>
-
getNumberOfViews
public int getNumberOfViews()- Specified by:
getNumberOfViews
in interfaceDistanceFromModelMultiView<Se3_F64,
AssociatedPair>
-