fix maybe unitialized warning
parent
08147c7011
commit
ecee078c0f
|
@ -9,10 +9,6 @@
|
|||
#include <gtsam/geometry/FundamentalMatrix.h>
|
||||
#include <gtsam/geometry/Point2.h>
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
|
||||
namespace gtsam {
|
||||
|
||||
//*************************************************************************
|
||||
|
@ -40,6 +36,9 @@ FundamentalMatrix::FundamentalMatrix(const Matrix3& U, double s,
|
|||
FundamentalMatrix::FundamentalMatrix(const Matrix3& F) {
|
||||
// Perform SVD
|
||||
Eigen::JacobiSVD<Matrix3> svd(F, Eigen::ComputeFullU | Eigen::ComputeFullV);
|
||||
if (svd.info() != Eigen::ComputationInfo::Success) {
|
||||
throw std::runtime_error("FundamentalMatrix::FundamentalMatrix: SVD computation failure");
|
||||
}
|
||||
|
||||
// Extract U and V
|
||||
Matrix3 U = svd.matrixU();
|
||||
|
|
Loading…
Reference in New Issue