| 115 | } |
| 116 | |
| 117 | Eigen::Vector2f ProjectPoint(const float* P, const Eigen::Vector3f& point) { |
| 118 | const Eigen::Map<const Eigen::Matrix<float, 3, 4, Eigen::RowMajor>> P_m(P); |
| 119 | const Eigen::Vector4f ph(point.x(), point.y(), point.z(), 1.0f); |
| 120 | const Eigen::Vector3f proj = P_m * ph; |
| 121 | return Eigen::Vector2f(proj(0) / proj(2), proj(1) / proj(2)); |
| 122 | } |
| 123 | |
| 124 | float ProjectPointDepth(const float* P, const Eigen::Vector3f& point) { |
| 125 | const Eigen::Map<const Eigen::Matrix<float, 3, 4, Eigen::RowMajor>> P_m(P); |
no outgoing calls
no test coverage detected