35 enum { dimension = 6 };
48 :
Cal3_S2(fx, fy, s, u0, v0), b_(b) {}
52 :
Cal3_S2(d(0), d(1), d(2), d(3), d(4)), b_(d(5)) {}
91 GTSAM_EXPORT
friend std::ostream&
operator<<(std::ostream&
os,
95 void print(
const std::string&
s =
"")
const override;
125 inline size_t dim()
const override {
return Dim(); }
128 inline static size_t Dim() {
return dimension; }
133 py() +
d(4), b_ +
d(5));
138 return T2.
vector() - vector();
146 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 148 friend class boost::serialization::access;
149 template <
class Archive>
150 void serialize(Archive& ar,
const unsigned int ) {
151 ar& boost::serialization::make_nvp(
152 "Cal3_S2", boost::serialization::base_object<Cal3_S2>(*
this));
153 ar& BOOST_SERIALIZATION_NVP(b_);
void print(const Matrix &A, const string &s, ostream &stream)
Cal3_S2Stereo retract(const Vector &d) const
Given 6-dim tangent vector, create new calibration.
Both ManifoldTraits and Testable.
size_t dim() const override
return DOF, dimensionality of tangent space
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
static size_t Dim()
return DOF, dimensionality of tangent space
std::string serialize(const T &input)
serializes to a string
Matrix3 K() const override
return calibration matrix K, same for left and right
Point2 calibrate(const Point2 &p, OptionalJacobian< 2, 5 > Dcal={}, OptionalJacobian< 2, 2 > Dp={}) const
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
Cal3_S2Stereo(double fx, double fy, double s, double u0, double v0, double b)
constructor from doubles
std::shared_ptr< Cal3 > shared_ptr
Cal3_S2Stereo(const Vector6 &d)
constructor from vector
The most common 5DOF 3D->2D calibration, stereo version.
int RealScalar int RealScalar * py
Array< int, Dynamic, 1 > v
RealScalar RealScalar * px
Array< double, 1, 3 > e(1./3., 0.5, 2.)
The most common 5DOF 3D->2D calibration.
virtual Matrix3 K() const
return calibration matrix K
Vector6 localCoordinates(const Cal3_S2Stereo &T2) const
Unretraction for the calibration.
Vector3 calibrate(const Vector3 &p) const
ofstream os("timeSchurFactors.csv")
Point2_ uncalibrate(const Expression< CALIBRATION > &K, const Point2_ &xy_hat)
const Cal3_S2 & calibration() const
return calibration, same for left and right
Vector6 vector() const
vectorized form (column-wise)
Vector5 vector() const
vectorized form (column-wise)
double baseline() const
return baseline
Cal3_S2Stereo(double fov, int w, int h, double b)
easy constructor; field-of-view in degrees, assumes zero skew
The most common 5DOF 3D->2D calibration.