Get rid of scale
parent
005efb3f07
commit
c68858d7b6
|
@ -59,7 +59,7 @@ FundamentalMatrix::FundamentalMatrix(const Matrix3& F) {
|
||||||
|
|
||||||
void FundamentalMatrix::initialize(const Matrix3& U, double s,
|
void FundamentalMatrix::initialize(const Matrix3& U, double s,
|
||||||
const Matrix3& V) {
|
const Matrix3& V) {
|
||||||
s_ = s / kScale;
|
s_ = s;
|
||||||
sign_ = 1.0;
|
sign_ = 1.0;
|
||||||
|
|
||||||
// Check if U is a reflection and flip U and sign_ if so
|
// Check if U is a reflection and flip U and sign_ if so
|
||||||
|
@ -82,7 +82,7 @@ void FundamentalMatrix::initialize(const Matrix3& U, double s,
|
||||||
}
|
}
|
||||||
|
|
||||||
Matrix3 FundamentalMatrix::matrix() const {
|
Matrix3 FundamentalMatrix::matrix() const {
|
||||||
return sign_ * U_.matrix() * Vector3(1.0, s_ * kScale, 0).asDiagonal() *
|
return sign_ * U_.matrix() * Vector3(1.0, s_, 0).asDiagonal() *
|
||||||
V_.transpose().matrix();
|
V_.transpose().matrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,11 +34,9 @@ class GTSAM_EXPORT FundamentalMatrix {
|
||||||
double s_; ///< Scalar parameter for S
|
double s_; ///< Scalar parameter for S
|
||||||
Rot3 V_; ///< Right rotation
|
Rot3 V_; ///< Right rotation
|
||||||
|
|
||||||
static constexpr double kScale = 1000; // s is stored in s_ as s/kScale
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// Default constructor
|
/// Default constructor
|
||||||
FundamentalMatrix() : U_(Rot3()), sign_(1.0), s_(1.0 / kScale), V_(Rot3()) {}
|
FundamentalMatrix() : U_(Rot3()), sign_(1.0), s_(1.0), V_(Rot3()) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Construct from U, V, and scalar s
|
* @brief Construct from U, V, and scalar s
|
||||||
|
|
Loading…
Reference in New Issue