21 #include <gtsam/base/DerivedValue.h>
33 static const size_t dimension = 3;
44 uL_(0), uR_(0), v_(0) {
49 uL_(uL), uR_(uR), v_(v) {
57 void print(
const std::string& s=
"")
const;
61 return (fabs(uL_ - q.uL_) < tol && fabs(uR_ - q.uR_) < tol && fabs(v_
84 return StereoPoint2(uL_ + b.uL_, uR_ + b.uR_, v_ + b.v_);
89 return StereoPoint2(uL_ - b.uL_, uR_ - b.uR_, v_ - b.v_);
97 inline static size_t Dim() {
return dimension; }
100 inline size_t dim()
const {
return dimension; }
132 inline double uL()
const {
return uL_;}
135 inline double uR()
const {
return uR_;}
138 inline double v()
const {
return v_;}
142 return Vector3(uL_, uR_, v_);
162 friend class boost::serialization::access;
163 template<
class ARCHIVE>
164 void serialize(ARCHIVE & ar,
const unsigned int version) {
165 ar & boost::serialization::make_nvp(
"StereoPoint2",
166 boost::serialization::base_object<Value>(*
this));
167 ar & BOOST_SERIALIZATION_NVP(uL_);
168 ar & BOOST_SERIALIZATION_NVP(uR_);
169 ar & BOOST_SERIALIZATION_NVP(v_);
StereoPoint2 inverse() const
inverse
Definition: StereoPoint2.h:73
Definition: StereoPoint2.h:31
size_t dim() const
return dimensionality of tangent space, DOF = 3
Definition: StereoPoint2.h:100
bool equals(const StereoPoint2 &q, double tol=1e-9) const
equals
Definition: StereoPoint2.h:60
Point2 point2()
convenient function to get a Point2 from the left image
Definition: StereoPoint2.h:146
void print(const Matrix &A, const string &s, ostream &stream)
print a matrix
Definition: Matrix.cpp:183
T between_default(const T &l1, const T &l2)
These core global functions can be specialized by new Lie types for better performance.
Definition: Lie.h:34
StereoPoint2(double uL, double uR, double v)
constructor
Definition: StereoPoint2.h:48
static StereoPoint2 identity()
identity
Definition: StereoPoint2.h:70
static StereoPoint2 Expmap(const Vector &d)
Exponential map around identity - just create a Point2 from a vector.
Definition: StereoPoint2.h:113
StereoPoint2 compose(const StereoPoint2 &p1) const
"Compose", just adds the coordinates of two points.
Definition: StereoPoint2.h:78
Point2 right()
convenient function to get a Point2 from the right image
Definition: StereoPoint2.h:151
StereoPoint2()
default constructor
Definition: StereoPoint2.h:43
static size_t Dim()
dimension of the variable - used to autodetect sizes */
Definition: StereoPoint2.h:97
Vector3 vector() const
convert to vector
Definition: StereoPoint2.h:141
StereoPoint2 operator-(const StereoPoint2 &b) const
subtract two stereo points
Definition: StereoPoint2.h:88
static Vector Logmap(const StereoPoint2 &p)
Log map around identity - just return the Point2 as a vector.
Definition: StereoPoint2.h:118
double uR() const
get uR
Definition: StereoPoint2.h:135
Vector localCoordinates(const StereoPoint2 &t2) const
Returns inverse retraction.
Definition: StereoPoint2.h:106
Definition: DerivedValue.h:44
double v() const
get v
Definition: StereoPoint2.h:138
StereoPoint2 between(const StereoPoint2 &p2) const
The difference between another point and this point.
Definition: StereoPoint2.h:123
StereoPoint2 retract(const Vector &v) const
Updates a with tangent space delta.
Definition: StereoPoint2.h:103
StereoPoint2 operator+(const StereoPoint2 &b) const
add two stereo points
Definition: StereoPoint2.h:83
double uL() const
get uL
Definition: StereoPoint2.h:132