43 double fx_, fy_, s_, u0_, v0_ ;
53 Cal3DS2_Base() : fx_(1), fy_(1), s_(0), u0_(0), v0_(0), k1_(0), k2_(0), p1_(0), p2_(0) {}
55 Cal3DS2_Base(
double fx,
double fy,
double s,
double u0,
double v0,
56 double k1,
double k2,
double p1 = 0.0,
double p2 = 0.0) :
57 fx_(fx), fy_(fy), s_(s), u0_(u0), v0_(v0), k1_(k1), k2_(k2), p1_(p1), p2_(p2) {}
59 virtual ~Cal3DS2_Base() {}
65 Cal3DS2_Base(
const Vector &v) ;
72 virtual void print(
const std::string& s =
"")
const ;
75 bool equals(
const Cal3DS2_Base& K,
double tol = 10e-9)
const;
82 inline double fx()
const {
return fx_;}
85 inline double fy()
const {
return fy_;}
88 inline double skew()
const {
return s_;}
91 inline double px()
const {
return u0_;}
94 inline double py()
const {
return v0_;}
97 inline double k1()
const {
return k1_;}
100 inline double k2()
const {
return k2_;}
103 inline double p1()
const {
return p1_;}
106 inline double p2()
const {
return p2_;}
112 Vector4
k()
const {
return Vector4(k1_, k2_, p1_, p2_); }
115 Vector9 vector()
const;
129 Point2 calibrate(
const Point2& p,
const double tol=1e-5)
const;
132 Matrix2 D2d_intrinsic(
const Point2& p)
const ;
135 Matrix29 D2d_calibration(
const Point2& p)
const ;
142 virtual boost::shared_ptr<Cal3DS2_Base>
clone()
const {
143 return boost::shared_ptr<Cal3DS2_Base>(
new Cal3DS2_Base(*
this));
154 friend class boost::serialization::access;
155 template<
class Archive>
156 void serialize(Archive & ar,
const unsigned int )
158 ar & BOOST_SERIALIZATION_NVP(fx_);
159 ar & BOOST_SERIALIZATION_NVP(fy_);
160 ar & BOOST_SERIALIZATION_NVP(s_);
161 ar & BOOST_SERIALIZATION_NVP(u0_);
162 ar & BOOST_SERIALIZATION_NVP(v0_);
163 ar & BOOST_SERIALIZATION_NVP(k1_);
164 ar & BOOST_SERIALIZATION_NVP(k2_);
165 ar & BOOST_SERIALIZATION_NVP(p1_);
166 ar & BOOST_SERIALIZATION_NVP(p2_);
double k1() const
First distortion coefficient.
Definition: Cal3DS2_Base.h:97
double px() const
image center in x
Definition: Cal3DS2_Base.h:91
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:141
double p2() const
Second tangential distortion coefficient.
Definition: Cal3DS2_Base.h:106
Vector4 k() const
return distortion parameter vector
Definition: Cal3DS2_Base.h:112
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition: OptionalJacobian.h:39
double fx() const
focal length x
Definition: Cal3DS2_Base.h:82
Cal3DS2_Base()
Default Constructor with only unit focal length.
Definition: Cal3DS2_Base.h:53
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
double py() const
image center in y
Definition: Cal3DS2_Base.h:94
virtual boost::shared_ptr< Cal3DS2_Base > clone() const
Definition: Cal3DS2_Base.h:142
double k2() const
Second distortion coefficient.
Definition: Cal3DS2_Base.h:100
double p1() const
First tangential distortion coefficient.
Definition: Cal3DS2_Base.h:103
Definition: Cal3DS2_Base.h:39
double fy() const
focal length x
Definition: Cal3DS2_Base.h:85
double skew() const
skew
Definition: Cal3DS2_Base.h:88