32 :
std::runtime_error(
"Stereo Cheirality Exception"),
89 void print(
const std::string&
s =
"")
const {
90 leftCamPose_.
print(
s +
".camera.");
91 K_->print(
s +
".calibration.");
97 && K_->equals(*camera.
K_,
tol);
105 inline size_t dim()
const {
110 static inline size_t Dim() {
135 return K_->baseline();
182 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 183 friend class boost::serialization::access;
184 template<
class Archive>
185 void serialize(Archive & ar,
const unsigned int ) {
186 ar & BOOST_SERIALIZATION_NVP(leftCamPose_);
187 ar & BOOST_SERIALIZATION_NVP(K_);
Both ManifoldTraits and Testable.
Point2_ project(const Point3_ &p_cam)
Expression version of PinholeBase::Project.
bool equals(const StereoCamera &camera, double tol=1e-9) const
equals
std::string serialize(const T &input)
serializes to a string
Point2_ project2(const Expression< CAMERA > &camera_, const Expression< POINT > &p_)
static Cal3_S2 K(500, 500, 0.1, 640/2, 480/2)
StereoCamera()
Default constructor allocates a calibration!
Cal3_S2Stereo::shared_ptr K_
Vector defaultErrorWhenTriangulatingBehindCamera() const
for Nonlinear Triangulation
bool equals(const Pose3 &pose, double tol=1e-9) const
assert equality up to a tolerance
static Point3 backproject(const Pose3 &pose, const Point2 &point, const double &depth)
size_t dim() const
Dimensionality of the tangent space.
std::vector< StereoPoint2 > StereoPoint2Vector
StereoPoint2Vector MeasurementVector
const Pose3 & pose() const
pose
StereoCheiralityException()
TangentVector localCoordinates(const Class &g) const
localCoordinates as required by manifold concept: finds tangent vector between *this and g ...
static size_t Dim()
Dimensionality of the tangent space.
Vector6 localCoordinates(const StereoCamera &t2) const
Local coordinates of manifold neighborhood around current value.
The most common 5DOF 3D->2D calibration, stereo version.
StereoCamera retract(const Vector &v) const
Updates a with tangent space delta.
StereoCheiralityException(Key j)
Key nearbyVariable() const
Array< int, Dynamic, 1 > v
Array< double, 1, 3 > e(1./3., 0.5, 2.)
std::shared_ptr< Cal3_S2Stereo > shared_ptr
void print(const std::string &s="") const
print
The most common 5DOF 3D->2D calibration + Stereo baseline.
void print(const std::string &s="") const
print with optional string
static const Pose3 pose(Rot3(Vector3(1, -1, -1).asDiagonal()), Point3(0, 0, 0.5))
const Cal3_S2Stereo & calibration() const
Return shared pointer to calibration.
A 2D stereo point (uL,uR,v)
double baseline() const
baseline
The matrix class, also used for vectors and row-vectors.
static const CalibratedCamera camera(kDefaultPose)
std::uint64_t Key
Integer nonlinear key type.