43 double k1_ = 0.0f, k2_ = 0.0f;
44 double p1_ = 0.0f, p2_ = 0.0f;
48 enum { dimension = 9 };
57 double k2,
double p1 = 0.0,
double p2 = 0.0,
double tol = 1
e-5)
58 :
Cal3(fx, fy, s, u0, v0),
72 :
Cal3(v(0), v(1), v(2), v(3), v(4)),
83 GTSAM_EXPORT
friend std::ostream&
operator<<(std::ostream&
os,
87 void print(
const std::string&
s =
"")
const override;
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_; }
109 Vector4
k()
const {
return Vector4(k1_, k2_, p1_, p2_); }
112 Vector9 vector()
const;
129 Matrix2 D2d_intrinsic(
const Point2& p)
const;
132 Matrix29 D2d_calibration(
const Point2& p)
const;
135 size_t dim()
const override {
return Dim(); }
138 inline static size_t Dim() {
return dimension; }
145 virtual boost::shared_ptr<Cal3DS2_Base>
clone()
const {
146 return boost::shared_ptr<Cal3DS2_Base>(
new Cal3DS2_Base(*
this));
156 friend class boost::serialization::access;
157 template <
class Archive>
159 ar& boost::serialization::make_nvp(
160 "Cal3DS2_Base", boost::serialization::base_object<Cal3>(*
this));
161 ar& BOOST_SERIALIZATION_NVP(k1_);
162 ar& BOOST_SERIALIZATION_NVP(k2_);
163 ar& BOOST_SERIALIZATION_NVP(p1_);
164 ar& BOOST_SERIALIZATION_NVP(p2_);
165 ar& BOOST_SERIALIZATION_NVP(tol_);
void print(const Matrix &A, const string &s, ostream &stream)
double p2() const
Second tangential distortion coefficient.
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
static size_t Dim()
return DOF, dimensionality of tangent space
Vector4 k() const
return distortion parameter vector
static Cal3_S2 K(500, 500, 0.1, 640/2, 480/2)
Cal3DS2_Base(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)
double p1() const
First tangential distortion coefficient.
size_t dim() const override
return DOF, dimensionality of tangent space
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Common code for all Calibration models.
virtual boost::shared_ptr< Cal3DS2_Base > clone() const
double k1() const
First distortion coefficient.
ofstream os("timeSchurFactors.csv")
double k2() const
Second distortion coefficient.
void serialize(Archive &ar, const unsigned int)
Point2_ uncalibrate(const Expression< CALIBRATION > &K, const Point2_ &xy_hat)
Cal3DS2_Base(const Vector9 &v)