Go to the documentation of this file.
44 double k1_ = 0.0f, k2_ = 0.0f;
45 double p1_ = 0.0f, p2_ = 0.0f;
49 inline constexpr
static auto dimension = 9;
61 double k2,
double p1 = 0.0,
double p2 = 0.0,
double tol = 1
e-5)
87 GTSAM_EXPORT
friend std::ostream&
operator<<(std::ostream&
os,
91 void print(
const std::string&
s =
"")
const override;
101 inline double k1()
const {
return k1_; }
104 inline double k2()
const {
return k2_; }
107 inline double p1()
const {
return p1_; }
110 inline double p2()
const {
return p2_; }
113 Vector4
k()
const {
return Vector4(k1_, k2_, p1_, p2_); }
116 Vector9 vector()
const;
126 OptionalJacobian<2, 2> Dp = {})
const;
129 Point2 calibrate(
const Point2&
p, OptionalJacobian<2, 9> Dcal = {},
130 OptionalJacobian<2, 2> Dp = {})
const;
133 Matrix2 D2d_intrinsic(
const Point2&
p)
const;
136 Matrix29 D2d_calibration(
const Point2&
p)
const;
139 size_t dim()
const override {
return Dim(); }
142 inline static size_t Dim() {
return dimension; }
149 virtual std::shared_ptr<Cal3DS2_Base>
clone()
const {
150 return std::shared_ptr<Cal3DS2_Base>(
new Cal3DS2_Base(*
this));
159 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
161 friend class boost::serialization::access;
162 template <
class Archive>
163 void serialize(Archive& ar,
const unsigned int ) {
164 ar& boost::serialization::make_nvp(
165 "Cal3DS2_Base", boost::serialization::base_object<Cal3>(*
this));
166 ar& BOOST_SERIALIZATION_NVP(k1_);
167 ar& BOOST_SERIALIZATION_NVP(k2_);
168 ar& BOOST_SERIALIZATION_NVP(p1_);
169 ar& BOOST_SERIALIZATION_NVP(p2_);
170 ar& BOOST_SERIALIZATION_NVP(tol_);
double p2() const
Second tangential distortion coefficient.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
static size_t Dim()
return DOF, dimensionality of tangent space
Calibration of a camera with radial distortion.
Common code for all Calibration models.
double k1() const
First distortion coefficient.
size_t dim() const override
return DOF, dimensionality of tangent space
ofstream os("timeSchurFactors.csv")
const Cal3_S2 cal(focalLength, focalLength, 0.0, principalPoint.x(), principalPoint.y())
double k2() const
Second distortion coefficient.
Vector4 k() const
return distortion parameter vector
Cal3DS2_Base(double fx, double fy, double s, double u0, double v0, double k1, double k2, double p1=0.0, double p2=0.0, double tol=1e-5)
void print(const Matrix &A, const string &s, ostream &stream)
virtual std::shared_ptr< Cal3DS2_Base > clone() const
Common base class for all calibration models.
double p1() const
First tangential distortion coefficient.
Point2_ uncalibrate(const Expression< CALIBRATION > &K, const Point2_ &xy_hat)
Array< int, Dynamic, 1 > v
std::shared_ptr< Cal3 > shared_ptr
Cal3DS2_Base(const Vector9 &v)
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:13