MCPcopy Create free account
hub / github.com/colmap/colmap / SolveTriangulationDlt

Function SolveTriangulationDlt

src/colmap/geometry/triangulation.cc:151–160  ·  view source on GitHub ↗

Solve the DLT system for the homogeneous point (smallest eigenvector of A).

Source from the content-addressed store, hash-verified

149
150// Solve the DLT system for the homogeneous point (smallest eigenvector of A).
151inline bool SolveTriangulationDlt(const Eigen::Matrix4d& A,
152 Eigen::Vector3d* xyz) {
153 const Eigen::SelfAdjointEigenSolver<Eigen::Matrix4d> eigen_solver(A);
154 if (eigen_solver.info() != Eigen::Success ||
155 eigen_solver.eigenvectors()(3, 0) == 0) {
156 return false;
157 }
158 *xyz = eigen_solver.eigenvectors().col(0).hnormalized();
159 return true;
160}
161
162} // namespace
163

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected