gtsam
Loading...
Searching...
No Matches
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
17
18#pragma once
19
22
23namespace gtsam {
24
28template<class CAMERA>
29class PinholeSet: public CameraSet<CAMERA> {
30
31private:
32 typedef CameraSet<CAMERA> Base;
33 typedef PinholeSet<CAMERA> This;
34
35protected:
36
37public:
38
40 virtual ~PinholeSet() {
41 }
42
45
47 void print(const std::string& s = "") const override {
48 Base::print(s);
49 }
50
52 bool equals(const PinholeSet& p, double tol = 1e-9) const {
53 return Base::equals(p, tol); // TODO all flags
54 }
55
57
60 const typename CAMERA::MeasurementVector& measured,
61 const TriangulationParameters& params) const {
62 return gtsam::triangulateSafe(*this, measured, params);
63 }
64
65private:
66
67#if GTSAM_ENABLE_BOOST_SERIALIZATION
69 friend class boost::serialization::access;
70 template<class ARCHIVE>
71 void serialize(ARCHIVE & ar, const unsigned int version) {
72 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
73 }
74#endif
75};
76
77template<class CAMERA>
78struct traits<PinholeSet<CAMERA> > : public Testable<PinholeSet<CAMERA> > {
79};
80
81template<class CAMERA>
82struct traits<const PinholeSet<CAMERA> > : public Testable<PinholeSet<CAMERA> > {
83};
84
85} // \ namespace gtsam
Base class to create smart factors on poses or cameras.
Functions for triangulation.
Global functions in a separate testing namespace.
Definition chartTesting.h:28
TriangulationResult triangulateSafe(const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measured, const TriangulationParameters &params)
triangulateSafe: extensive checking of the outcome
Definition triangulation.h:706
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition Group.h:37
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:152
A set of cameras, all with their own calibration.
Definition CameraSet.h:37
virtual void print(const std::string &s="") const
print
Definition CameraSet.h:86
bool equals(const CameraSet &p, double tol=1e-9) const
equals
Definition CameraSet.h:92
PinholeSet: triangulates point and keeps an estimate of it around.
Definition PinholeSet.h:29
TriangulationResult triangulateSafe(const typename CAMERA::MeasurementVector &measured, const TriangulationParameters &params) const
triangulateSafe
Definition PinholeSet.h:59
bool equals(const PinholeSet &p, double tol=1e-9) const
equals
Definition PinholeSet.h:52
virtual ~PinholeSet()
Virtual destructor.
Definition PinholeSet.h:40
void print(const std::string &s="") const override
print
Definition PinholeSet.h:47
Definition triangulation.h:566
TriangulationResult is an optional point, along with the reasons why it is invalid.
Definition triangulation.h:646