38 enum { dimension = 6 };
46 K_(1, 1, 0, 0, 0), b_(1.0) {
50 Cal3_S2Stereo(
double fx,
double fy,
double s,
double u0,
double v0,
double b) :
51 K_(fx, fy, s, u0, v0), b_(b) {
55 Cal3_S2Stereo(
const Vector &d): K_(d(0), d(1), d(2), d(3), d(4)), b_(d(5)){}
59 K_(fov, w, h), b_(b) {
66 void print(
const std::string& s =
"")
const;
82 inline double fx()
const {
return K_.
fx();}
85 inline double fy()
const {
return K_.
fy();}
88 inline double skew()
const {
return K_.
skew();}
91 inline double px()
const {
return K_.
px();}
94 inline double py()
const {
return K_.
py();}
114 inline size_t dim()
const {
130 return T2.
vector() - vector();
140 friend class boost::serialization::access;
141 template<
class Archive>
142 void serialize(Archive & ar,
const unsigned int )
144 ar & BOOST_SERIALIZATION_NVP(K_);
145 ar & BOOST_SERIALIZATION_NVP(b_);
size_t dim() const
return DOF, dimensionality of tangent space
Definition: Cal3_S2Stereo.h:114
double fx() const
focal length x
Definition: Cal3_S2.h:92
Vector5 vector() const
vectorized form (column-wise)
Definition: Cal3_S2.h:127
double skew() const
skew
Definition: Cal3_S2Stereo.h:88
static size_t Dim()
return DOF, dimensionality of tangent space
Definition: Cal3_S2Stereo.h:119
The most common 5DOF 3D->2D calibration.
Cal3_S2Stereo()
default calibration leaves coordinates unchanged
Definition: Cal3_S2Stereo.h:45
Both ManifoldTraits and Testable.
Definition: Manifold.h:120
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:141
boost::shared_ptr< Cal3_S2Stereo > shared_ptr
shared pointer to stereo calibration object
Definition: Cal3_S2Stereo.h:39
double py() const
image center in y
Definition: Cal3_S2.h:117
double fx() const
focal length x
Definition: Cal3_S2Stereo.h:82
Template to create a binary predicate.
Definition: Testable.h:110
double px() const
image center in x
Definition: Cal3_S2.h:112
Matrix matrix() const
return calibration matrix K, same for left and right
Definition: Cal3_S2Stereo.h:79
Vector6 localCoordinates(const Cal3_S2Stereo &T2) const
Unretraction for the calibration.
Definition: Cal3_S2Stereo.h:129
double px() const
image center in x
Definition: Cal3_S2Stereo.h:91
double py() const
image center in y
Definition: Cal3_S2Stereo.h:94
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
Cal3_S2Stereo retract(const Vector &d) const
Given 6-dim tangent vector, create new calibration.
Definition: Cal3_S2Stereo.h:124
Vector6 vector() const
vectorized form (column-wise)
Definition: Cal3_S2Stereo.h:103
Definition: Cal3_S2Stereo.h:30
Cal3_S2Stereo(double fx, double fy, double s, double u0, double v0, double b)
constructor from doubles
Definition: Cal3_S2Stereo.h:50
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
const Cal3_S2 & calibration() const
return calibration, same for left and right
Definition: Cal3_S2Stereo.h:76
double fy() const
focal length x
Definition: Cal3_S2Stereo.h:85
double baseline() const
return baseline
Definition: Cal3_S2Stereo.h:100
Cal3_S2Stereo(double fov, int w, int h, double b)
easy constructor; field-of-view in degrees, assumes zero skew
Definition: Cal3_S2Stereo.h:58
double fy() const
focal length y
Definition: Cal3_S2.h:97
double skew() const
skew
Definition: Cal3_S2.h:107
Cal3_S2Stereo(const Vector &d)
constructor from vector
Definition: Cal3_S2Stereo.h:55
Point2 principalPoint() const
return the principal point
Definition: Cal3_S2.h:122
Matrix3 matrix() const
Definition: Cal3_S2.h:141
Point2 principalPoint() const
return the principal point
Definition: Cal3_S2Stereo.h:97