26 using namespace gtsam;
39 static
Cal3Unified K(100, 105, 0.0, 320, 240, 1
e-3, 2.0 * 1e-3, 3.0 * 1e-3,
45 Point2 p_i(364.7791831734982, 305.6677211952602);
105 2.0 * 1
e-3 + 8, 3.0 * 1
e-3 + 9, 4.0 * 1
e-3 + 10,
112 d << 2, 3, 4, 5, 6, 7, 8, 9, 10, 1;
133 std::stringstream
os;
134 os <<
"fx: " << cal.
fx() <<
", fy: " << cal.
fy() <<
", s: " << cal.
skew()
135 <<
", px: " << cal.
px() <<
", py: " << cal.
py() <<
", k1: " << cal.
k1()
136 <<
", k2: " << cal.
k2() <<
", p1: " << cal.
p1() <<
", p2: " << cal.
p2()
137 <<
", xi: " << cal.
xi();
bool assert_stdout_equal(const std::string &expected, const V &actual)
double p2() const
Second tangential distortion coefficient.
Point2 calibrate_(const Cal3Unified &k, const Point2 &pt)
double fy() const
focal length y
Provides additional testing facilities for common data structures.
Concept check for values that can be used in unit tests.
static int runAllTests(TestResult &result)
Point2 uncalibrate_(const Cal3Unified &k, const Point2 &pt)
A non-templated config holding any types of Manifold-group elements.
void insert(Key j, const Value &val)
static Cal3Unified K(100, 105, 0.0, 320, 240, 1e-3, 2.0 *1e-3, 3.0 *1e-3, 4.0 *1e-3, 0.1)
Point2 nPlaneToSpace(const Point2 &p) const
Convert a normalized unit plane point to 3D space.
size_t dim() const override
Return dimensions of calibration manifold object.
Some functions to compute numerical derivatives.
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative21(const boost::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)
double p1() const
First tangential distortion coefficient.
Point2 uncalibrate(const Point2 &p, OptionalJacobian< 2, 10 > Dcal=boost::none, OptionalJacobian< 2, 2 > Dp=boost::none) const
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
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative22(boost::function< Y(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5)
double py() const
image center in y
const ValueType at(Key j) const
#define EXPECT(condition)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
EIGEN_DEVICE_FUNC const Scalar & q
Point2 spaceToNPlane(const Point2 &p) const
Convert a 3D point to normalized unit plane.
static Point2 p(0.5, 0.7)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
double k1() const
First distortion coefficient.
#define GTSAM_CONCEPT_MANIFOLD_INST(T)
#define EXPECT_LONGS_EQUAL(expected, actual)
ofstream os("timeSchurFactors.csv")
static size_t Dim()
Return dimensions of calibration manifold object.
double k2() const
Second distortion coefficient.
Cal3Unified retract(const Vector &d) const
Given delta vector, update calibration.
TEST(LPInitSolver, InfiniteLoopSingleVar)
Vector localCoordinates(const Cal3Unified &T2) const
Given a different calibration, calculate update to obtain it.
double px() const
image center in x
double fx() const
focal length x
Unified Calibration Model, see Mei07icra for details.
std::uint64_t Key
Integer nonlinear key type.
void Print(const CONTAINER &keys, const string &s, const KeyFormatter &keyFormatter)
#define GTSAM_CONCEPT_TESTABLE_INST(T)