Loading...
Searching...
No Matches
Cal3Unified.h
Go to the documentation of this file.
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* -------------------------------------------------------------------------- */
#pragma once
#include <gtsam/geometry/Cal3DS2_Base.h>
namespace gtsam {
class GTSAM_EXPORT Cal3Unified : public Cal3DS2_Base {
using This = Cal3Unified;
using Base = Cal3DS2_Base;
private:
double xi_ = 0.0f;
public:
enum { dimension = 10 };
using shared_ptr = boost::shared_ptr<Cal3Unified>;
Cal3Unified() = default;
Cal3Unified(double fx, double fy, double s, double u0, double v0, double k1,
double k2, double p1 = 0.0, double p2 = 0.0, double xi = 0.0)
: Base(fx, fy, s, u0, v0, k1, k2, p1, p2), xi_(xi) {}
~Cal3Unified() override {}
Cal3Unified(const Vector10& v)
: Base(v(0), v(1), v(2), v(3), v(4), v(5), v(6), v(7), v(8)), xi_(v(9)) {}
GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
const Cal3Unified& cal);
void print(const std::string& s = "") const override;
bool equals(const Cal3Unified& K, double tol = 10e-9) const;
inline double xi() const { return xi_; }
Vector10 vector() const;
Point2 uncalibrate(const Point2& p,
OptionalJacobian<2, 10> Dcal = boost::none,
OptionalJacobian<2, 2> Dp = boost::none) const;
Point2 calibrate(const Point2& p, OptionalJacobian<2, 10> Dcal = boost::none,
OptionalJacobian<2, 2> Dp = boost::none) const;
Point2 spaceToNPlane(const Point2& p) const;
Point2 nPlaneToSpace(const Point2& p) const;
Cal3Unified retract(const Vector& d) const;
Vector localCoordinates(const Cal3Unified& T2) const;
size_t dim() const override { return Dim(); }
inline static size_t Dim() { return dimension; }
private:
friend class boost::serialization::access;
template <class Archive>
void serialize(Archive& ar, const unsigned int /*version*/) {
ar& boost::serialization::make_nvp(
"Cal3Unified", boost::serialization::base_object<Cal3DS2_Base>(*this));
ar& BOOST_SERIALIZATION_NVP(xi_);
}
};
template <>
struct traits<Cal3Unified> : public internal::Manifold<Cal3Unified> {};
template <>
struct traits<const Cal3Unified> : public internal::Manifold<Cal3Unified> {};
}
gtsam
Global functions in a separate testing namespace.
Definition chartTesting.h:28
gtsam::print
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
gtsam::Point2
Vector2 Point2
As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point2 to Vector2...
Definition Point2.h:27
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
gtsam::internal::Manifold
Both ManifoldTraits and Testable.
Definition Manifold.h:120
gtsam::OptionalJacobian
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
gtsam::Cal3::fx
double fx() const
focal length x
Definition Cal3.h:139
gtsam::Cal3::fy
double fy() const
focal length y
Definition Cal3.h:142
gtsam::Cal3DS2_Base::Cal3DS2_Base
Cal3DS2_Base()=default
Default Constructor with only unit focal length.
gtsam::Cal3DS2_Base::p2
double p2() const
Second tangential distortion coefficient.
Definition Cal3DS2_Base.h:110
gtsam::Cal3DS2_Base::k2
double k2() const
Second distortion coefficient.
Definition Cal3DS2_Base.h:104
gtsam::Cal3DS2_Base::k1
double k1() const
First distortion coefficient.
Definition Cal3DS2_Base.h:101
gtsam::Cal3DS2_Base::p1
double p1() const
First tangential distortion coefficient.
Definition Cal3DS2_Base.h:107
gtsam::Cal3Unified
Calibration of a omni-directional camera with mirror + lens radial distortion.
Definition Cal3Unified.h:45
gtsam::Cal3Unified::dim
size_t dim() const override
Return dimensions of calibration manifold object.
Definition Cal3Unified.h:133
gtsam::Cal3Unified::Cal3Unified
Cal3Unified()=default
Default Constructor with only unit focal length.
gtsam::Cal3Unified::xi
double xi() const
mirror parameter
Definition Cal3Unified.h:96
gtsam::Cal3Unified::Dim
static size_t Dim()
Return dimensions of calibration manifold object.
Definition Cal3Unified.h:136