21 #include <gtsam/base/DerivedValue.h>
44 double fx_, fy_, s_, u0_, v0_ ;
50 Eigen::Vector4d k()
const {
return Eigen::Vector4d(k1_, k2_, p1_, p2_); }
51 Vector vector()
const ;
57 Cal3DS2_Base() : fx_(1), fy_(1), s_(0), u0_(0), v0_(0), k1_(0), k2_(0), p1_(0), p2_(0) {}
59 Cal3DS2_Base(
double fx,
double fy,
double s,
double u0,
double v0,
60 double k1,
double k2,
double p1 = 0.0,
double p2 = 0.0) :
61 fx_(fx), fy_(fy), s_(s), u0_(u0), v0_(v0), k1_(k1), k2_(k2), p1_(p1), p2_(p2) {}
67 Cal3DS2_Base(
const Vector &v) ;
74 void print(
const std::string& s =
"")
const ;
77 bool equals(
const Cal3DS2_Base& K,
double tol = 10e-9)
const;
84 inline double fx()
const {
return fx_;}
87 inline double fy()
const {
return fy_;}
90 inline double skew()
const {
return s_;}
93 inline double px()
const {
return u0_;}
96 inline double py()
const {
return v0_;}
99 inline double k1()
const {
return k1_;}
102 inline double k2()
const {
return k2_;}
105 inline double p1()
const {
return p1_;}
108 inline double p2()
const {
return p2_;}
118 boost::optional<Matrix&> Dcal = boost::none,
119 boost::optional<Matrix&> Dp = boost::none)
const ;
122 Point2 calibrate(
const Point2& p,
const double tol=1e-5)
const;
125 Matrix D2d_intrinsic(
const Point2& p)
const ;
128 Matrix D2d_calibration(
const Point2& p)
const ;
138 friend class boost::serialization::access;
139 template<
class Archive>
140 void serialize(Archive & ar,
const unsigned int version)
142 ar & BOOST_SERIALIZATION_NVP(fx_);
143 ar & BOOST_SERIALIZATION_NVP(fy_);
144 ar & BOOST_SERIALIZATION_NVP(s_);
145 ar & BOOST_SERIALIZATION_NVP(u0_);
146 ar & BOOST_SERIALIZATION_NVP(v0_);
147 ar & BOOST_SERIALIZATION_NVP(k1_);
148 ar & BOOST_SERIALIZATION_NVP(k2_);
149 ar & BOOST_SERIALIZATION_NVP(p1_);
150 ar & BOOST_SERIALIZATION_NVP(p2_);
double fy() const
focal length x
Definition: Cal3DS2_Base.h:87
Definition: Cal3DS2_Base.h:40
double k2() const
Second distortion coefficient.
Definition: Cal3DS2_Base.h:102
double p2() const
Second tangential distortion coefficient.
Definition: Cal3DS2_Base.h:108
void print(const Matrix &A, const string &s, ostream &stream)
print a matrix
Definition: Matrix.cpp:183
double p1() const
First tangential distortion coefficient.
Definition: Cal3DS2_Base.h:105
double py() const
image center in y
Definition: Cal3DS2_Base.h:96
double k1() const
First distortion coefficient.
Definition: Cal3DS2_Base.h:99
double px() const
image center in x
Definition: Cal3DS2_Base.h:93
Cal3DS2_Base()
Default Constructor with only unit focal length.
Definition: Cal3DS2_Base.h:57
double skew() const
skew
Definition: Cal3DS2_Base.h:90
double fx() const
focal length x
Definition: Cal3DS2_Base.h:84