gtsam  4.1.0
gtsam
PinholeSet.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
18 #pragma once
19 
22 #include <boost/optional.hpp>
23 
24 namespace gtsam {
25 
29 template<class CAMERA>
30 class PinholeSet: public CameraSet<CAMERA> {
31 
32 private:
33  typedef CameraSet<CAMERA> Base;
34  typedef PinholeSet<CAMERA> This;
35 
36 protected:
37 
38 public:
39 
41  virtual ~PinholeSet() {
42  }
43 
46 
48  void print(const std::string& s = "") const override {
49  Base::print(s);
50  }
51 
53  bool equals(const PinholeSet& p, double tol = 1e-9) const {
54  return Base::equals(p, tol); // TODO all flags
55  }
56 
58 
61  const typename CAMERA::MeasurementVector& measured,
62  const TriangulationParameters& params) const {
63  return gtsam::triangulateSafe(*this, measured, params);
64  }
65 
66 private:
67 
70  template<class ARCHIVE>
71  void serialize(ARCHIVE & ar, const unsigned int version) {
72  ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
73  }
74 };
75 
76 template<class CAMERA>
77 struct traits<PinholeSet<CAMERA> > : public Testable<PinholeSet<CAMERA> > {
78 };
79 
80 template<class CAMERA>
81 struct traits<const PinholeSet<CAMERA> > : public Testable<PinholeSet<CAMERA> > {
82 };
83 
84 } // \ namespace gtsam
gtsam::PinholeSet
PinholeSet: triangulates point and keeps an estimate of it around.
Definition: PinholeSet.h:30
gtsam::CameraSet::equals
bool equals(const CameraSet &p, double tol=1e-9) const
equals
Definition: CameraSet.h:88
gtsam::traits
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
triangulation.h
Functions for triangulation.
gtsam::TriangulationResult
TriangulationResult is an optional point, along with the reasons why it is invalid.
Definition: triangulation.h:369
gtsam::CameraSet::print
virtual void print(const std::string &s="") const
print
Definition: CameraSet.h:81
gtsam::CameraSet
A set of cameras, all with their own calibration.
Definition: CameraSet.h:35
gtsam
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
CameraSet.h
Base class to create smart factors on poses or cameras.
gtsam::Testable
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:150
gtsam::PinholeSet::print
void print(const std::string &s="") const override
print
Definition: PinholeSet.h:48
gtsam::PinholeSet::equals
bool equals(const PinholeSet &p, double tol=1e-9) const
equals
Definition: PinholeSet.h:53
gtsam::triangulateSafe
TriangulationResult triangulateSafe(const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measured, const TriangulationParameters &params)
triangulateSafe: extensive checking of the outcome
Definition: triangulation.h:440
gtsam::PinholeSet::access
friend class boost::serialization::access
Serialization function.
Definition: PinholeSet.h:69
gtsam::PinholeSet::triangulateSafe
TriangulationResult triangulateSafe(const typename CAMERA::MeasurementVector &measured, const TriangulationParameters &params) const
triangulateSafe
Definition: PinholeSet.h:60
gtsam::TriangulationParameters
Definition: triangulation.h:306
gtsam::PinholeSet::~PinholeSet
virtual ~PinholeSet()
Virtual destructor.
Definition: PinholeSet.h:41