diff --git a/gtsam/geometry/Cal3Bundler.h b/gtsam/geometry/Cal3Bundler.h index fff9a6e6d..e508710cd 100644 --- a/gtsam/geometry/Cal3Bundler.h +++ b/gtsam/geometry/Cal3Bundler.h @@ -36,6 +36,8 @@ private: double u0_, v0_; ///< image center, not a parameter to be optimized but a constant public: + /// dimension of the variable - used to autodetect sizes + static const size_t dimension = 3; /// @name Standard Constructors /// @{ diff --git a/gtsam/geometry/Cal3DS2.h b/gtsam/geometry/Cal3DS2.h index 51fe958d6..82bfa4c5f 100644 --- a/gtsam/geometry/Cal3DS2.h +++ b/gtsam/geometry/Cal3DS2.h @@ -46,6 +46,9 @@ protected: double p1_, p2_ ; // tangential distortion public: + /// dimension of the variable - used to autodetect sizes + static const size_t dimension = 9; + Matrix K() const ; Eigen::Vector4d k() const { return Eigen::Vector4d(k1_, k2_, p1_, p2_); } Vector vector() const ; diff --git a/gtsam/geometry/Cal3Unified.h b/gtsam/geometry/Cal3Unified.h index 58e024c27..eacbf7053 100644 --- a/gtsam/geometry/Cal3Unified.h +++ b/gtsam/geometry/Cal3Unified.h @@ -50,8 +50,9 @@ private: double xi_; // mirror parameter public: - //Matrix K() const ; - //Eigen::Vector4d k() const { return Base::k(); } + /// dimension of the variable - used to autodetect sizes + static const size_t dimension = 10; + Vector vector() const ; /// @name Standard Constructors