38 os <<
", xi: " << cal.
xi();
63 const double xi =
xi_;
66 const double xs = p.x(), ys = p.y();
67 const double sqrt_nx =
sqrt(xs * xs + ys * ys + 1.0);
68 const double xi_sqrt_nx = 1.0 / (1 + xi * sqrt_nx);
69 const double xi_sqrt_nx2 = xi_sqrt_nx * xi_sqrt_nx;
70 const double x = xs * xi_sqrt_nx,
y = ys * xi_sqrt_nx;
82 DU << -xs * sqrt_nx * xi_sqrt_nx2,
83 -ys * sqrt_nx * xi_sqrt_nx2;
84 *Dcal << H1base, H2base * DU;
90 const double denom = 1.0 * xi_sqrt_nx2 / sqrt_nx;
91 const double mid = -(xi * xs * ys) * denom;
93 DU << (sqrt_nx + xi * (ys * ys + 1)) * denom, mid,
94 mid, (sqrt_nx + xi * (xs * xs + 1)) * denom;
111 calibrateJacobians<Cal3Unified, dimension>(*
this, pn, Dcal, Dp);
117 const double x = p.x(),
y = p.y();
118 const double xy2 = x * x +
y *
y;
119 const double sq_xy = (
xi_ +
sqrt(1 + (1 -
xi_ *
xi_) * xy2)) / (xy2 + 1);
121 return Point2((sq_xy * x / (sq_xy - xi_)), (sq_xy * y / (sq_xy - xi_)));
126 const double x = p.x(),
y = p.y();
127 const double sq_xy = 1 +
xi_ *
sqrt(x * x +
y *
y + 1);
129 return Point2((x / sq_xy), (
y / sq_xy));
void print(const Matrix &A, const string &s, ostream &stream)
bool equals(const Cal3Unified &K, double tol=10e-9) const
assert equality up to a tolerance
Point2 nPlaneToSpace(const Point2 &p) const
Convert a normalized unit plane point to 3D space.
void print(const std::string &s="") const override
print with optional string
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Pose2 T2(M_PI/2.0, Point2(0.0, 2.0))
Point2 uncalibrate(const Point2 &p, OptionalJacobian< 2, 10 > Dcal=boost::none, OptionalJacobian< 2, 2 > Dp=boost::none) const
virtual Matrix3 K() const
return calibration matrix K
Vector10 vector() const
Return all parameters as a vector.
Point2 calibrate(const Point2 &p, OptionalJacobian< 2, 9 > Dcal=boost::none, OptionalJacobian< 2, 2 > Dp=boost::none) const
Convert (distorted) image coordinates uv to intrinsic coordinates xy.
Point2 calibrate(const Point2 &p, OptionalJacobian< 2, 10 > Dcal=boost::none, OptionalJacobian< 2, 2 > Dp=boost::none) const
Conver a pixel coordinate to ideal coordinate.
double xi() const
mirror parameter
bool equals(const Cal3DS2_Base &K, double tol=1e-8) const
assert equality up to a tolerance
Cal3Unified()=default
Default Constructor with only unit focal length.
double xi_
mirror parameter
Point2 spaceToNPlane(const Point2 &p) const
Convert a 3D point to normalized unit plane.
void print(const std::string &s="") const override
print with optional string
typedef and functions to augment Eigen's VectorXd
Point2 uncalibrate(const Point2 &p, OptionalJacobian< 2, 9 > Dcal=boost::none, OptionalJacobian< 2, 2 > Dp=boost::none) const
ofstream os("timeSchurFactors.csv")
Vector9 vector() const
Return all parameters as a vector.
Cal3Unified retract(const Vector &d) const
Given delta vector, update calibration.
Vector localCoordinates(const Cal3Unified &T2) const
Given a different calibration, calculate update to obtain it.
Annotation indicating that a class derives from another given type.
Unified Calibration Model, see Mei07icra for details.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
GTSAM_EXPORT friend std::ostream & operator<<(std::ostream &os, const Cal3Unified &cal)
Output stream operator.