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
Pose2 T2(M_PI/2.0, Point2(0.0, 2.0))
Calibration of a camera with radial distortion, calculations in base class Cal3DS2_Base.
virtual Matrix3 K() const
return calibration matrix K
Definition: Cal3.h:167
Eigen::VectorXd Vector
Definition: Vector.h:38
bool equals(const Cal3DS2_Base &K, double tol=1e-8) const
assert equality up to a tolerance
bool equals(const Cal3DS2 &K, double tol=10e-9) const
assert equality up to a tolerance
Definition: Cal3DS2.cpp:37
Cal3DS2 retract(const Vector &d) const
Given delta vector, update calibration.
Definition: Cal3DS2.cpp:43
void print(const std::string &s="") const override
print with optional string
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")
Vector9 vector() const
Return all parameters as a vector.
3D Point
Annotation indicating that a class derives from another given type.
Definition: attr.h:42
const G double tol
Definition: Group.h:83
void print(const std::string &s="") const override
print with optional string
Definition: Cal3DS2.cpp:34
2D Point


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:41:44