MCPcopy Create free account
hub / github.com/ComputationalRobotics/XM-code / SampsonError

Function SampsonError

deps/glomap/glomap/math/two_view_geometry.cc:57–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57double SampsonError(const Eigen::Matrix3d& E,
58 const Eigen::Vector2d& x1,
59 const Eigen::Vector2d& x2) {
60 Eigen::Vector3d Ex1 = E * x1.homogeneous();
61 Eigen::Vector3d Etx2 = E.transpose() * x2.homogeneous();
62
63 double C = Ex1.dot(x2.homogeneous());
64 double Cx = Ex1.head(2).squaredNorm();
65 double Cy = Etx2.head(2).squaredNorm();
66 double r2 = C * C / (Cx + Cy);
67
68 return r2;
69}
70
71double SampsonError(const Eigen::Matrix3d& E,
72 const Eigen::Vector3d& x1,

Callers 2

ScoreErrorEssentialMethod · 0.85
ScoreErrorFundamentalMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected