Fix old eigen builds
parent
e24def4abb
commit
c4396e2de9
|
@ -36,9 +36,11 @@ FundamentalMatrix::FundamentalMatrix(const Matrix3& U, double s,
|
||||||
FundamentalMatrix::FundamentalMatrix(const Matrix3& F) {
|
FundamentalMatrix::FundamentalMatrix(const Matrix3& F) {
|
||||||
// Perform SVD
|
// Perform SVD
|
||||||
Eigen::JacobiSVD<Matrix3> svd(F, Eigen::ComputeFullU | Eigen::ComputeFullV);
|
Eigen::JacobiSVD<Matrix3> svd(F, Eigen::ComputeFullU | Eigen::ComputeFullV);
|
||||||
|
#if EIGEN_VERSION_AT_LEAST(3, 4, 0)
|
||||||
if (svd.info() != Eigen::ComputationInfo::Success) {
|
if (svd.info() != Eigen::ComputationInfo::Success) {
|
||||||
throw std::runtime_error("FundamentalMatrix::FundamentalMatrix: SVD computation failure");
|
throw std::runtime_error("FundamentalMatrix::FundamentalMatrix: SVD computation failure");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Extract U and V
|
// Extract U and V
|
||||||
Matrix3 U = svd.matrixU();
|
Matrix3 U = svd.matrixU();
|
||||||
|
|
Loading…
Reference in New Issue