| 55 | } |
| 56 | |
| 57 | double 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 | |
| 71 | double SampsonError(const Eigen::Matrix3d& E, |
| 72 | const Eigen::Vector3d& x1, |
no outgoing calls
no test coverage detected