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 /* ************************************************************************* */
gtsam::Cal3DS2_Base::equals
bool equals(const Cal3DS2_Base &K, double tol=1e-8) const
assert equality up to a tolerance
Definition: Cal3DS2_Base.cpp:49
base
Annotation indicating that a class derives from another given type.
Definition: attr.h:64
Vector.h
typedef and functions to augment Eigen's VectorXd
s
RealScalar s
Definition: level1_cplx_impl.h:126
d
static const double d[K][N]
Definition: igam.h:11
gtsam::operator<<
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
Definition: testGroup.cpp:109
gtsam::Cal3DS2::localCoordinates
Vector localCoordinates(const Cal3DS2 &T2) const
Given a different calibration, calculate update to obtain it.
Definition: Cal3DS2.cpp:48
gtsam::Cal3DS2
Calibration of a camera with radial distortion that also supports Lie-group behaviors for optimizatio...
Definition: Cal3DS2.h:35
gtsam::Cal3DS2_Base
Calibration of a camera with radial distortion.
Definition: Cal3DS2_Base.h:42
Matrix.h
typedef and functions to augment Eigen's MatrixXd
Point3.h
3D Point
gtsam::Cal3DS2_Base::print
void print(const std::string &s="") const override
print with optional string
Definition: Cal3DS2_Base.cpp:43
os
ofstream os("timeSchurFactors.csv")
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:38
fixture::cal
const Cal3_S2 cal(focalLength, focalLength, 0.0, principalPoint.x(), principalPoint.y())
Point2.h
2D Point
gtsam::Cal3DS2::retract
Cal3DS2 retract(const Vector &d) const
Given delta vector, update calibration.
Definition: Cal3DS2.cpp:43
gtsam::Cal3DS2_Base::vector
Vector9 vector() const
Return all parameters as a vector.
Definition: Cal3DS2_Base.cpp:28
T2
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
gtsam::Cal3::K
virtual Matrix3 K() const
return calibration matrix K
Definition: Cal3.h:167
gtsam::Cal3DS2::print
void print(const std::string &s="") const override
print with optional string
Definition: Cal3DS2.cpp:34
gtsam::Cal3DS2::Cal3DS2
Cal3DS2()=default
Default Constructor with only unit focal length.
gtsam
traits
Definition: SFMdata.h:40
gtsam::Cal3DS2::equals
bool equals(const Cal3DS2 &K, double tol=10e-9) const
assert equality up to a tolerance
Definition: Cal3DS2.cpp:37
K
#define K
Definition: igam.h:8
Cal3DS2.h
Calibration of a camera with radial distortion, calculations in base class Cal3DS2_Base.
gtsam::tol
const G double tol
Definition: Group.h:79


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:01:56