Merge pull request #2036 from jmackay2/fix_old_eigen

Fix old eigen builds
release/4.3a0
Varun Agrawal 2025-02-28 23:46:06 -05:00 committed by GitHub
commit c6a22301b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -36,9 +36,11 @@ FundamentalMatrix::FundamentalMatrix(const Matrix3& U, double s,
FundamentalMatrix::FundamentalMatrix(const Matrix3& F) {
// Perform SVD
Eigen::JacobiSVD<Matrix3> svd(F, Eigen::ComputeFullU | Eigen::ComputeFullV);
#if EIGEN_VERSION_AT_LEAST(3, 4, 0)
if (svd.info() != Eigen::ComputationInfo::Success) {
throw std::runtime_error("FundamentalMatrix::FundamentalMatrix: SVD computation failure");
}
#endif
// Extract U and V
Matrix3 U = svd.matrixU();