Go to the documentation of this file.
23 using namespace gtsam;
42 double r =
p.x() *
p.x() +
p.y() *
p.y();
43 double distortion = 1.0 +
v[1] * r +
v[2] * r * r;
44 double u =
K.
px() +
v[0] * distortion *
p.x();
45 double v_coord =
K.
py() +
v[0] * distortion *
p.y();
128 double r2 =
p.x() *
p.x() +
p.y() *
p.y();
129 double distortion = 1.0 +
v[1] *
r2 +
v[2] *
r2 *
r2;
131 K.
px() +
v[0] * distortion *
p.x(),
132 K.
py() +
v[0] * distortion *
p.y());
175 std::stringstream
os;
176 os <<
"f: " <<
cal.
fx() <<
", k1: " <<
cal.k1() <<
", k2: " <<
cal.k2()
177 <<
", px: " <<
cal.
px() <<
", py: " <<
cal.
py();
static int runAllTests(TestResult &result)
Cal3Bundler retract(const Vector &d) const
Update calibration with tangent space delta.
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)
Point2 calibrate(const Point2 &p, OptionalJacobian< 2, 5 > Dcal={}, OptionalJacobian< 2, 2 > Dp={}) const
Concept check for values that can be used in unit tests.
#define EXPECT(condition)
Point2 uncalibrate(const Point2 &p, OptionalJacobian< 2, 5 > Dcal={}, OptionalJacobian< 2, 2 > Dp={}) const
Point2 uncalibrate_(const Cal3Bundler &k, const Point2 &pt)
double py() const
image center in y
Vector3 localCoordinates(const Cal3Bundler &T2) const
Calculate local coordinates to another calibration.
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)
ofstream os("timeSchurFactors.csv")
static Cal3Bundler K(500, 1e-3, 1e-3, 1000, 2000)
const Cal3_S2 cal(focalLength, focalLength, 0.0, principalPoint.x(), principalPoint.y())
Provides additional testing facilities for common data structures.
Point2 calibrate_(const Cal3Bundler &k, const Point2 &pt)
Point2 uncalibrate(const Point2 &p, OptionalJacobian< 2, 3 > Dcal={}, OptionalJacobian< 2, 2 > Dp={}) const
: convert intrinsic coordinates xy to image coordinates uv Version of uncalibrate with derivatives
Some functions to compute numerical derivatives.
bool assert_stdout_equal(const std::string &expected, const V &actual)
Calibration used by Bundler.
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)
static size_t Dim()
Return DOF, dimensionality of tangent space.
void Print(const CONTAINER &keys, const string &s, const KeyFormatter &keyFormatter)
Array< int, Dynamic, 1 > v
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 calibrate(const Point2 &pi, OptionalJacobian< 2, 3 > Dcal={}, OptionalJacobian< 2, 2 > Dp={}) const
Calibration used by Bundler.
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:07:19