public class DistanceSe3SymmetricSq extends java.lang.Object implements DistanceModelStereoPixels<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.
|
DistanceSe3SymmetricSq(TriangulateTwoViewsCalibrated triangulate,
double key_fx,
double key_fy,
double key_skew,
double curr_fx,
double curr_fy,
double curr_skew)
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) |
void |
setIntrinsic(double cam1_fx,
double cam1_fy,
double cam1_skew,
double cam2_fx,
double cam2_fy,
double cam2_skew)
Specifies intrinsic parameters See comment above about how to specify error units using
intrinsic parameters.
|
void |
setModel(georegression.struct.se.Se3_F64 keyToCurr) |
public DistanceSe3SymmetricSq(TriangulateTwoViewsCalibrated triangulate, double key_fx, double key_fy, double key_skew, double curr_fx, double curr_fy, double curr_skew)
triangulate - Triangulates the intersection of two observationspublic DistanceSe3SymmetricSq(TriangulateTwoViewsCalibrated triangulate)
triangulate - Triangulates the intersection of two observationspublic void setIntrinsic(double cam1_fx,
double cam1_fy,
double cam1_skew,
double cam2_fx,
double cam2_fy,
double cam2_skew)
setIntrinsic in interface DistanceModelStereoPixels<georegression.struct.se.Se3_F64,AssociatedPair>cam1_fx - intrinsic parameter: focal length x for camera 1cam1_fy - intrinsic parameter: focal length y for camera 1cam1_skew - intrinsic parameter: skew for camera 1 (usually zero)cam2_fx - intrinsic parameter: focal length x for camera 2cam2_fy - intrinsic parameter: focal length y for camera 2cam2_skew - intrinsic parameter: skew for camera 2 (usually zero)public 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>