51 double k1_ = 0.0f, k2_ = 0.0f;
52 double k3_ = 0.0f, k4_ = 0.0f;
56 enum { dimension = 9 };
67 const double v0,
const double k1,
const double k2,
68 const double k3,
const double k4,
double tol = 1
e-5)
69 :
Cal3(fx, fy, s, u0, v0),
83 :
Cal3(v(0), v(1), v(2), v(3), v(4)),
94 inline double k1()
const {
return k1_; }
97 inline double k2()
const {
return k2_; }
100 inline double k3()
const {
return k3_; }
103 inline double k4()
const {
return k4_; }
106 Vector4
k()
const {
return Vector4(k1_, k2_, k3_, k4_); }
109 Vector9 vector()
const;
112 static double Scaling(
double r);
141 GTSAM_EXPORT
friend std::ostream&
operator<<(std::ostream&
os,
145 void print(
const std::string&
s =
"")
const override;
155 size_t dim()
const override {
return Dim(); }
158 inline static size_t Dim() {
return dimension; }
167 return T2.
vector() - vector();
175 virtual boost::shared_ptr<Cal3Fisheye>
clone()
const {
176 return boost::shared_ptr<Cal3Fisheye>(
new Cal3Fisheye(*
this));
186 friend class boost::serialization::access;
187 template <
class Archive>
189 ar& boost::serialization::make_nvp(
190 "Cal3Fisheye", boost::serialization::base_object<Cal3>(*
this));
191 ar& BOOST_SERIALIZATION_NVP(k1_);
192 ar& BOOST_SERIALIZATION_NVP(k2_);
193 ar& BOOST_SERIALIZATION_NVP(k3_);
194 ar& BOOST_SERIALIZATION_NVP(k4_);
void print(const Matrix &A, const string &s, ostream &stream)
Both ManifoldTraits and Testable.
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
double k2() const
Second distortion coefficient.
static size_t Dim()
Return dimensions of calibration manifold object.
static Cal3_S2 K(500, 500, 0.1, 640/2, 480/2)
Pose2 T2(M_PI/2.0, Point2(0.0, 2.0))
double k4() const
Second tangential distortion coefficient.
double k1() const
First distortion coefficient.
void serialize(Archive &ar, const unsigned int)
Cal3Fisheye retract(const Vector &d) const
Given delta vector, update calibration.
UniformScaling< float > Scaling(float s)
boost::shared_ptr< Cal3 > shared_ptr
size_t dim() const override
Return dimensions of calibration manifold object.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Common code for all Calibration models.
double k3() const
First tangential distortion coefficient.
Vector9 vector() const
Return all parameters as a vector.
Vector localCoordinates(const Cal3Fisheye &T2) const
Given a different calibration, calculate update to obtain it.
ofstream os("timeSchurFactors.csv")
Point2_ uncalibrate(const Expression< CALIBRATION > &K, const Point2_ &xy_hat)
Cal3Fisheye(const Vector9 &v)
Cal3Fisheye(const double fx, const double fy, const double s, const double u0, const double v0, const double k1, const double k2, const double k3, const double k4, double tol=1e-5)
Vector4 k() const
return distortion parameter vector
virtual boost::shared_ptr< Cal3Fisheye > clone() const