| 868 | } |
| 869 | |
| 870 | float Initializer::ComputeReprojectionError( |
| 871 | const Eigen::Vector3f& point3d, |
| 872 | const Eigen::Vector3f& bearing_observed, |
| 873 | const Eigen::Matrix3f& R, |
| 874 | const Eigen::Vector3f& t |
| 875 | ) const { |
| 876 | // point3d: 3D point in frame1 (reference) coordinates |
| 877 | // R: rotation from frame1 to frame2 |
| 878 | // t: translation from frame1 to frame2 |
| 879 | |
| 880 | // Transform 3D point to frame2 coordinate |
| 881 | Eigen::Vector3f point_in_frame2 = R * point3d + t; |
| 882 | |
| 883 | return ComputeReprojectionErrorInFrame(point_in_frame2, bearing_observed); |
| 884 | } |
| 885 | |
| 886 | bool Initializer::ValidateInitialization( |
| 887 | const std::vector<Eigen::Vector3f>& bearings1, |
nothing calls this directly
no outgoing calls
no test coverage detected