29 using namespace gtsam;
48 static const Unit3 bearing1(-0.156054862928174, 0.156054862928174,
50 static const Unit3 bearing2(-0.156054862928174, -0.156054862928174,
52 static const Unit3 bearing3(0.156054862928174, -0.156054862928174,
54 static const Unit3 bearing4(0.156054862928174, 0.156054862928174,
57 static double depth = 0.512640224719052;
83 Rot3 rot(1., 0., 0., 0., 0., 1., 0., -1., 0.);
86 Point3 actual = camera.backproject(
Unit3(0, 0, 1), 1.);
88 pair<Unit3, bool>
x = camera.projectSafe(expected);
135 camera.reprojectionError(
point1, bearing_noisy, Dpose, Dpoint);
151 camera.project2(
point1, Dpose, Dpoint);
static const Unit3 bearing4(0.156054862928174, 0.156054862928174, 0.975342893301088)
int EIGEN_BLAS_FUNC() rot(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pc, RealScalar *ps)
static Point2 project(const Pose3 &pose, const Unit3 &pointAtInfinity, const Cal3_S2::shared_ptr &cal)
Vector2 reprojectionError(const Point3 &point, const Unit3 &measured, OptionalJacobian< 2, 6 > Dpose={}, OptionalJacobian< 2, 3 > Dpoint={}) const
Concept check for values that can be used in unit tests.
static int runAllTests(TestResult &result)
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 y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set origin
static const Point3 point1(-0.08, -0.08, 0.0)
static Vector2 reprojectionError2(const Pose3 &pose, const Point3 &point, const Unit3 &measured)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
static const Point3 point4(0.08, -0.08, 0.0)
Calibrated camera with spherical projection.
Some functions to compute numerical derivatives.
Unit3 project(const Point3 &point, OptionalJacobian< 2, 6 > Dpose={}, OptionalJacobian< 2, 3 > Dpoint={}) const
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
static Point3 backproject(const Pose3 &pose, const Point2 &point, const double &depth)
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)
Represents a 3D point on a unit sphere.
TEST(SphericalCamera, constructor)
static const Unit3 bearing3(0.156054862928174, -0.156054862928174, 0.975342893301088)
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative32(std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
static const Point3 point3(0.08, 0.08, 0.0)
#define EXPECT(condition)
static const Unit3 bearing2(-0.156054862928174, -0.156054862928174, 0.975342893301088)
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative31(std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static const Camera camera(pose)
static const Pose3 pose1(Rot3(), Point3(0, 1, 0.5))
Unit3 retract(const Vector2 &v, OptionalJacobian< 2, 2 > H={}) const
The retract function.
static const Pose3 pose(Rot3(Vector3(1, -1, -1).asDiagonal()), Point3(0, 0, 0.5))
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 Unit3 project3(const Pose3 &pose, const Point3 &point)
static const Point3 point2(-0.08, 0.08, 0.0)
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
static const Unit3 bearing1(-0.156054862928174, 0.156054862928174, 0.975342893301088)
static const Camera camera1(pose1)