53 double k1_ = 0.0f, k2_ = 0.0f;
54 double k3_ = 0.0f, k4_ = 0.0f;
58 enum { dimension = 9 };
69 const double v0,
const double k1,
const double k2,
70 const double k3,
const double k4,
double tol = 1
e-5)
71 :
Cal3(fx, fy, s, u0, v0),
85 :
Cal3(v(0), v(1), v(2), v(3), v(4)),
96 inline double k1()
const {
return k1_; }
99 inline double k2()
const {
return k2_; }
102 inline double k3()
const {
return k3_; }
105 inline double k4()
const {
return k4_; }
108 Vector4
k()
const {
return Vector4(k1_, k2_, k3_, k4_); }
111 Vector9 vector()
const;
114 static double Scaling(
double r);
143 GTSAM_EXPORT
friend std::ostream&
operator<<(std::ostream&
os,
147 void print(
const std::string&
s =
"")
const override;
157 size_t dim()
const override {
return Dim(); }
160 inline static size_t Dim() {
return dimension; }
169 return T2.
vector() - vector();
177 virtual std::shared_ptr<Cal3Fisheye>
clone()
const {
178 return std::shared_ptr<Cal3Fisheye>(
new Cal3Fisheye(*
this));
187 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 189 friend class boost::serialization::access;
190 template <
class Archive>
191 void serialize(Archive& ar,
const unsigned int ) {
192 ar& boost::serialization::make_nvp(
193 "Cal3Fisheye", boost::serialization::base_object<Cal3>(*
this));
194 ar& BOOST_SERIALIZATION_NVP(k1_);
195 ar& BOOST_SERIALIZATION_NVP(k2_);
196 ar& BOOST_SERIALIZATION_NVP(k3_);
197 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)
std::string serialize(const T &input)
serializes to a string
static size_t Dim()
Return dimensions of calibration manifold object.
static Cal3_S2 K(500, 500, 0.1, 640/2, 480/2)
Vector localCoordinates(const Cal3Fisheye &T2) const
Given a different calibration, calculate update to obtain it.
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
double k3() const
First tangential distortion coefficient.
std::shared_ptr< Cal3 > shared_ptr
Common base class for all calibration models.
Vector9 vector() const
Return all parameters as a vector.
UniformScaling< float > Scaling(float s)
Vector4 k() const
return distortion parameter vector
size_t dim() const override
Return dimensions of calibration manifold object.
Array< int, Dynamic, 1 > v
Array< double, 1, 3 > e(1./3., 0.5, 2.)
double k2() const
Second distortion coefficient.
Common code for all Calibration models.
double k4() const
Second tangential distortion coefficient.
ofstream os("timeSchurFactors.csv")
double k1() const
First distortion coefficient.
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)
Cal3Fisheye retract(const Vector &d) const
Given delta vector, update calibration.
Calibration of a fisheye camera.
virtual std::shared_ptr< Cal3Fisheye > clone() const