Cal3DS2.cpp
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 
19 #include <gtsam/base/Matrix.h>
20 #include <gtsam/base/Vector.h>
21 #include <gtsam/geometry/Cal3DS2.h>
22 #include <gtsam/geometry/Point2.h>
23 #include <gtsam/geometry/Point3.h>
24 
25 namespace gtsam {
26 
27 /* ************************************************************************* */
28 std::ostream& operator<<(std::ostream& os, const Cal3DS2& cal) {
29  os << (Cal3DS2_Base&)cal;
30  return os;
31 }
32 
33 /* ************************************************************************* */
34 void Cal3DS2::print(const std::string& s) const { Base::print(s); }
35 
36 /* ************************************************************************* */
37 bool Cal3DS2::equals(const Cal3DS2& K, double tol) const {
38  const Cal3DS2_Base* base = dynamic_cast<const Cal3DS2_Base*>(&K);
39  return Cal3DS2_Base::equals(*base, tol);
40 }
41 
42 /* ************************************************************************* */
44  return Cal3DS2(vector() + d);
45 }
46 
47 /* ************************************************************************* */
49  return T2.vector() - vector();
50 }
51 }
52 /* ************************************************************************* */
Vector localCoordinates(const Cal3DS2 &T2) const
Given a different calibration, calculate update to obtain it.
Definition: Cal3DS2.cpp:48
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
Definition: testGroup.cpp:109
Calibration of a camera with radial distortion.
Definition: Cal3DS2_Base.h:42
Calibration of a camera with radial distortion, calculations in base class Cal3DS2_Base.
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
Eigen::VectorXd Vector
Definition: Vector.h:38
bool equals(const Cal3DS2 &K, double tol=10e-9) const
assert equality up to a tolerance
Definition: Cal3DS2.cpp:37
RealScalar s
Vector9 vector() const
Return all parameters as a vector.
Calibration of a camera with radial distortion that also supports Lie-group behaviors for optimizatio...
Definition: Cal3DS2.h:35
void print(const std::string &s="") const override
print with optional string
virtual Matrix3 K() const
return calibration matrix K
Definition: Cal3.h:167
Cal3DS2 retract(const Vector &d) const
Given delta vector, update calibration.
Definition: Cal3DS2.cpp:43
traits
Definition: chartTesting.h:28
typedef and functions to augment Eigen&#39;s VectorXd
Cal3DS2()=default
Default Constructor with only unit focal length.
ofstream os("timeSchurFactors.csv")
bool equals(const Cal3DS2_Base &K, double tol=1e-8) const
assert equality up to a tolerance
3D Point
Annotation indicating that a class derives from another given type.
Definition: attr.h:61
const G double tol
Definition: Group.h:86
void print(const std::string &s="") const override
print with optional string
Definition: Cal3DS2.cpp:34
2D Point


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:00