I'm looking at how COLMAP does multi-view triangulation. I can't work out what this function is doing. I can't find any formulas which look similar. The input "proj_matricies" come from pose data, the "points" are from the mono camera measurements. Seems like it is reducing an error in the projection matrices themselves? Is it trying to find some sort of overall projection error for all the observations? Any point in the right direction would be greatly appreciated!!
Eigen::Vector3d TriangulateMultiViewPoint(
const std::vector<Eigen::Matrix3x4d>& proj_matrices,
const std::vector<Eigen::Vector2d>& points) {
CHECK_EQ(proj_matrices.size(), points.size());
Eigen::Matrix4d A = Eigen::Matrix4d::Zero();
for (size_t i = 0; i < points.size(); i++) {
const Eigen::Vector3d point = points[i].homogeneous().normalized();
const Eigen::Matrix3x4d term =
proj_matrices[i] - point * point.transpose() * proj_matrices[i];
A += term.transpose() * term;
}
Eigen::SelfAdjointEigenSolver<Eigen::Matrix4d> eigen_solver(A);
return eigen_solver.eigenvectors().col(0).hnormalized();
}