28 using namespace gtsam;
38 static const Point3
point1(-0.08,-0.08, 0.0);
39 static const Point3
point2(-0.08, 0.08, 0.0);
40 static const Point3
point3( 0.08, 0.08, 0.0);
41 static const Point3
point4( 0.08,-0.08, 0.0);
55 boost::function<CalibratedCamera(Pose3)>
f =
56 boost::bind(CalibratedCamera::Create, _1, boost::none);
180 camera.
project2(pointAtInfinity, Dpose, Dpoint);
188 const double& depth) {
195 static const double depth = 5.4;
215 const double depth(10);
218 camera.
backproject(point, depth, Dpose, Dpoint, Ddepth);
static Point2 project2(const CalibratedCamera &camera, const Point3 &point)
static Point2 project(const Pose3 &pose, const Unit3 &pointAtInfinity, const Cal3_S2::shared_ptr &cal)
static Point3 BackprojectFromCamera(const CalibratedCamera &camera, const Point2 &point, const double &depth)
Concept check for values that can be used in unit tests.
static int runAllTests(TestResult &result)
Point2 project2(const Point3 &point, OptionalJacobian< 2, 6 > Dpose=boost::none, OptionalJacobian< 2, 3 > Dpoint=boost::none) const
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative33(boost::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Some functions to compute numerical derivatives.
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative31(boost::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
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)
const Pose3 & pose() const
return pose, constant version
static Point3 backproject(const Pose3 &pose, const Point2 &point, const double &depth)
Unit3 pointAtInfinity(0, 0,-1000)
Represents a 3D point on a unit sphere.
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative32(boost::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Point3 backproject(const Point2 &pn, double depth, OptionalJacobian< 3, 6 > Dresult_dpose=boost::none, OptionalJacobian< 3, 2 > Dresult_dp=boost::none, OptionalJacobian< 3, 1 > Dresult_ddepth=boost::none) const
backproject a 2-dimensional point to a 3-dimensional point at given depth
Point3 transformTo(const Point3 &point, OptionalJacobian< 3, 6 > Hself=boost::none, OptionalJacobian< 3, 3 > Hpoint=boost::none) const
takes point in world coordinates and transforms it to Pose coordinates
static Point2 Project2(const Unit3 &point)
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative22(boost::function< Y(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5)
static const Pose3 pose(Rot3(Vector3(1,-1,-1).asDiagonal()), Point3(0, 0, 0.5))
TEST(CalibratedCamera, constructor)
#define EXPECT(condition)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
static Point3 BackprojectFromCamera(const Point2 &p, const double depth, OptionalJacobian< 3, 2 > Dpoint=boost::none, OptionalJacobian< 3, 1 > Ddepth=boost::none)
backproject a 2-dimensional point to a 3-dimensional point at given depth
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static const Point3 point3(0.08, 0.08, 0.0)
static const Point3 point2(-0.08, 0.08, 0.0)
Point2 project(const Point3 &point, OptionalJacobian< 2, 6 > Dcamera=boost::none, OptionalJacobian< 2, 3 > Dpoint=boost::none) const
Calibrated camera for which only pose is unknown.
static Point2 projectAtInfinity(const CalibratedCamera &camera, const Unit3 &point)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
static Point2 Project1(const Point3 &point)
#define GTSAM_CONCEPT_MANIFOLD_INST(T)
static const Point3 point1(-0.08,-0.08, 0.0)
Point2(* Project)(const Point3 &, OptionalJacobian< 2, 3 >)
static const Pose3 kDefaultPose(Rot3(Vector3(1,-1,-1).asDiagonal()), Point3(0, 0, 0.5))
static const Point3 point4(0.08,-0.08, 0.0)
static const CalibratedCamera camera(kDefaultPose)
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
void test2(OptionalJacobian<-1,-1 > H=boost::none)