34 double k1_ = 0.0f, k2_ = 0.0f;
42 enum { dimension = 3 };
64 :
Cal3(f, f, 0,
u0,
v0), k1_(k1), k2_(k2), tol_(
tol) {}
73 GTSAM_EXPORT
friend std::ostream&
operator<<(std::ostream&
os,
77 void print(
const std::string&
s =
"")
const override;
87 inline double k1()
const {
return k1_; }
90 inline double k2()
const {
return k2_; }
93 inline double px()
const {
return u0_; }
96 inline double py()
const {
return v0_; }
98 Matrix3
K()
const override;
126 Matrix2 D2d_intrinsic(
const Point2& p)
const;
129 Matrix23 D2d_calibration(
const Point2& p)
const;
132 Matrix25 D2d_intrinsic_calibration(
const Point2& p)
const;
139 size_t dim()
const override {
return Dim(); }
142 inline static size_t Dim() {
return dimension; }
151 return T2.
vector() - vector();
159 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 161 friend class boost::serialization::access;
162 template <
class Archive>
163 void serialize(Archive& ar,
const unsigned int ) {
164 ar& boost::serialization::make_nvp(
165 "Cal3Bundler", boost::serialization::base_object<Cal3>(*
this));
166 ar& BOOST_SERIALIZATION_NVP(k1_);
167 ar& BOOST_SERIALIZATION_NVP(k2_);
168 ar& BOOST_SERIALIZATION_NVP(tol_);
void print(const Matrix &A, const string &s, ostream &stream)
Vector3 localCoordinates(const Cal3Bundler &T2) const
Calculate local coordinates to another calibration.
Both ManifoldTraits and Testable.
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
std::string serialize(const T &input)
serializes to a string
static Cal3_S2 K(500, 500, 0.1, 640/2, 480/2)
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
std::shared_ptr< Cal3 > shared_ptr
Common base class for all calibration models.
Cal3Bundler retract(const Vector &d) const
Update calibration with tangent space delta.
double k1() const
distorsion parameter k1
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Common code for all Calibration models.
size_t dim() const override
return DOF, dimensionality of tangent space
double k2() const
distorsion parameter k2
Calibration used by Bundler.
Cal3Bundler(double f, double k1, double k2, double u0=0, double v0=0, double tol=1e-5)
ofstream os("timeSchurFactors.csv")
Point2_ uncalibrate(const Expression< CALIBRATION > &K, const Point2_ &xy_hat)
double px() const
image center in x
static size_t Dim()
return DOF, dimensionality of tangent space
double py() const
image center in y