Go to the documentation of this file.
23 using namespace gtsam;
28 static Cal3DS2 K(500, 100, 0.1, 320, 240, 1
e-3, 2.0 * 1
e-3, 3.0 * 1
e-3,
35 double r =
p.x() *
p.x() +
p.y() *
p.y();
36 double g = 1 + k[0] * r + k[1] * r * r;
37 double tx = 2 * k[2] *
p.x() *
p.y() + k[3] * (r + 2 *
p.x() *
p.x());
38 double ty = k[2] * (r + 2 *
p.y() *
p.y()) + 2 * k[3] *
p.x() *
p.y();
39 Vector v_hat = (
Vector(3) <<
g *
p.x() + tx,
g *
p.y() + ty, 1.0).finished();
41 Point2 p_i(v_i(0) / v_i(2), v_i(1) / v_i(2));
99 2.0 * 1
e-3 + 7, 3.0 * 1
e-3 + 8, 4.0 * 1
e-3 + 9);
105 d << 1, 2, 3, 4, 5, 6, 7, 8, 9;
114 std::stringstream
os;
116 <<
", px: " <<
cal.
px() <<
", py: " <<
cal.
py() <<
", k1: " <<
cal.k1()
117 <<
", k2: " <<
cal.k2() <<
", p1: " <<
cal.p1() <<
", p2: " <<
cal.p2();
double fy() const
focal length y
static int runAllTests(TestResult &result)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static const double d[K][N]
#define GTSAM_CONCEPT_TESTABLE_INST(T)
#define EXPECT_LONGS_EQUAL(expected, actual)
Concept check for values that can be used in unit tests.
Vector localCoordinates(const Cal3DS2 &T2) const
Given a different calibration, calculate update to obtain it.
#define EXPECT(condition)
Calibration of a camera with radial distortion that also supports Lie-group behaviors for optimizatio...
double py() const
image center in y
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative22(std::function< Y(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5)
static const Point3 pt(1.0, 2.0, 3.0)
Point2 calibrate_(const Cal3DS2 &k, const Point2 &pt)
ofstream os("timeSchurFactors.csv")
Matrix2 D2d_intrinsic(const Point2 &p) const
Derivative of uncalibrate wrpt intrinsic coordinates.
Point2 uncalibrate_(const Cal3DS2 &k, const Point2 &pt)
const Cal3_S2 cal(focalLength, focalLength, 0.0, principalPoint.x(), principalPoint.y())
Provides additional testing facilities for common data structures.
static size_t Dim()
Return dimensions of calibration manifold object.
Vector4 k() const
return distortion parameter vector
Cal3DS2 retract(const Vector &d) const
Given delta vector, update calibration.
Some functions to compute numerical derivatives.
bool assert_stdout_equal(const std::string &expected, const V &actual)
EIGEN_DEVICE_FUNC const Scalar & q
virtual Matrix3 K() const
return calibration matrix K
void g(const string &key, int i)
double fx() const
focal length x
TEST(SmartFactorBase, Pinhole)
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative21(const std::function< Y(const X1 &, const X2 &)> &h, const X1 &x1, const X2 &x2, double delta=1e-5)
Calibration of a camera with radial distortion, calculations in base class Cal3DS2_Base.
Point2 calibrate(const Point2 &p, OptionalJacobian< 2, 9 > Dcal={}, OptionalJacobian< 2, 2 > Dp={}) const
Convert (distorted) image coordinates uv to intrinsic coordinates xy.
void Print(const CONTAINER &keys, const string &s, const KeyFormatter &keyFormatter)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
#define GTSAM_CONCEPT_MANIFOLD_INST(T)
**
double px() const
image center in x
Point2 uncalibrate(const Point2 &p, OptionalJacobian< 2, 9 > Dcal={}, OptionalJacobian< 2, 2 > Dp={}) const
Matrix29 D2d_calibration(const Point2 &p) const
Derivative of uncalibrate wrpt the calibration parameters.
static Cal3DS2 K(500, 100, 0.1, 320, 240, 1e-3, 2.0 *1e-3, 3.0 *1e-3, 4.0 *1e-3)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:07:19