Cal3DS2.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
21 #pragma once
22 
24 
25 namespace gtsam {
26 
34 class GTSAM_EXPORT Cal3DS2 : public Cal3DS2_Base {
35  using Base = Cal3DS2_Base;
36 
37  public:
38  enum { dimension = 9 };
39 
42 
44  Cal3DS2() = default;
45 
46  Cal3DS2(double fx, double fy, double s, double u0, double v0, double k1,
47  double k2, double p1 = 0.0, double p2 = 0.0, double tol = 1e-5)
48  : Base(fx, fy, s, u0, v0, k1, k2, p1, p2, tol) {}
49 
50  ~Cal3DS2() override {}
51 
55 
56  Cal3DS2(const Vector9& v) : Base(v) {}
57 
61 
63  GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
64  const Cal3DS2& cal);
65 
67  void print(const std::string& s = "") const override;
68 
70  bool equals(const Cal3DS2& K, double tol = 10e-9) const;
71 
75 
77  Cal3DS2 retract(const Vector& d) const;
78 
80  Vector localCoordinates(const Cal3DS2& T2) const;
81 
83  size_t dim() const override { return Dim(); }
84 
86  inline static size_t Dim() { return dimension; }
87 
91 
93  boost::shared_ptr<Base> clone() const override {
94  return boost::shared_ptr<Base>(new Cal3DS2(*this));
95  }
96 
98 
99  private:
102 
104  friend class boost::serialization::access;
105  template <class Archive>
106  void serialize(Archive& ar, const unsigned int /*version*/) {
107  ar& boost::serialization::make_nvp(
108  "Cal3DS2", boost::serialization::base_object<Cal3DS2_Base>(*this));
109  }
110 
112 };
113 
114 template <>
115 struct traits<Cal3DS2> : public internal::Manifold<Cal3DS2> {};
116 
117 template <>
118 struct traits<const Cal3DS2> : public internal::Manifold<Cal3DS2> {};
119 }
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
Both ManifoldTraits and Testable.
Definition: Manifold.h:120
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
Definition: testGroup.cpp:109
void serialize(Archive &ar, const unsigned int)
Definition: Cal3DS2.h:106
Vector3f p1
ArrayXcf v
Definition: Cwise_arg.cpp:1
boost::shared_ptr< Base > clone() const override
Definition: Cal3DS2.h:93
static Cal3_S2 K(500, 500, 0.1, 640/2, 480/2)
Pose2 T2(M_PI/2.0, Point2(0.0, 2.0))
size_t dim() const override
Return dimensions of calibration manifold object.
Definition: Cal3DS2.h:83
~Cal3DS2() override
Definition: Cal3DS2.h:50
const double fy
Eigen::VectorXd Vector
Definition: Vector.h:38
Cal3DS2(const Vector9 &v)
Definition: Cal3DS2.h:56
Array< double, 1, 3 > e(1./3., 0.5, 2.)
RealScalar s
static const double u0
Cal3DS2(double fx, double fy, double s, double u0, double v0, double k1, double k2, double p1=0.0, double p2=0.0, double tol=1e-5)
Definition: Cal3DS2.h:46
traits
Definition: chartTesting.h:28
static size_t Dim()
Return dimensions of calibration manifold object.
Definition: Cal3DS2.h:86
ofstream os("timeSchurFactors.csv")
static const double v0
static Point3 p2
const G double tol
Definition: Group.h:83
const double fx


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:41:44