51 double k1_ = 0.0f, k2_ = 0.0f;
52 double k3_ = 0.0f, k4_ = 0.0f;
56 enum { dimension = 9 };
58 using shared_ptr = boost::shared_ptr<Cal3Fisheye>;
66 Cal3Fisheye(
const double fx,
const double fy,
const double s,
const double u0,
67 const double v0,
const double k1,
const double k2,
68 const double k3,
const double k4,
double tol = 1e-5)
69 :
Cal3(fx, fy, s, u0, v0),
82 explicit Cal3Fisheye(
const Vector9& v)
83 : Cal3(v(0), v(1), v(2), v(3), v(4)),
94 inline double k1()
const {
return k1_; }
97 inline double k2()
const {
return k2_; }
100 inline double k3()
const {
return k3_; }
103 inline double k4()
const {
return k4_; }
106 Vector4
k()
const {
return Vector4(k1_, k2_, k3_, k4_); }
109 Vector9 vector()
const;
112 static double Scaling(
double r);
141 GTSAM_EXPORT
friend std::ostream& operator<<(std::ostream& os,
145 void print(
const std::string& s =
"")
const override;
155 size_t dim()
const override {
return Dim(); }
158 inline static size_t Dim() {
return dimension; }
167 return T2.
vector() - vector();
175 virtual boost::shared_ptr<Cal3Fisheye>
clone()
const {
176 return boost::shared_ptr<Cal3Fisheye>(
new Cal3Fisheye(*
this));
186 friend class boost::serialization::access;
187 template <
class Archive>
188 void serialize(Archive& ar,
const unsigned int ) {
189 ar& boost::serialization::make_nvp(
190 "Cal3Fisheye", boost::serialization::base_object<Cal3>(*
this));
191 ar& BOOST_SERIALIZATION_NVP(k1_);
192 ar& BOOST_SERIALIZATION_NVP(k2_);
193 ar& BOOST_SERIALIZATION_NVP(k3_);
194 ar& BOOST_SERIALIZATION_NVP(k4_);
Common code for all Calibration models.
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
std::string serialize(const T &input)
serializes to a string
Definition: serialization.h:112
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:155
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
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
Both ManifoldTraits and Testable.
Definition: Manifold.h:120
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition: OptionalJacobian.h:39
Template to create a binary predicate.
Definition: Testable.h:111
Definition: Cal3Fisheye.h:49
double k4() const
Second tangential distortion coefficient.
Definition: Cal3Fisheye.h:103
double k1() const
First distortion coefficient.
Definition: Cal3Fisheye.h:94
double k3() const
First tangential distortion coefficient.
Definition: Cal3Fisheye.h:100
Vector localCoordinates(const Cal3Fisheye &T2) const
Given a different calibration, calculate update to obtain it.
Definition: Cal3Fisheye.h:166
static size_t Dim()
Return dimensions of calibration manifold object.
Definition: Cal3Fisheye.h:158
double k2() const
Second distortion coefficient.
Definition: Cal3Fisheye.h:97
size_t dim() const override
Return dimensions of calibration manifold object.
Definition: Cal3Fisheye.h:155
Vector9 vector() const
Return all parameters as a vector.
Definition: Cal3Fisheye.cpp:28
virtual boost::shared_ptr< Cal3Fisheye > clone() const
Definition: Cal3Fisheye.h:175
Vector4 k() const
return distortion parameter vector
Definition: Cal3Fisheye.h:106
Cal3Fisheye()=default
Default Constructor with only unit focal length.
Cal3Fisheye retract(const Vector &d) const
Given delta vector, update calibration.
Definition: Cal3Fisheye.h:161