Go to the documentation of this file.
27 #include <gtsam/dllexport.h>
28 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
29 #include <boost/serialization/nvp.hpp>
83 static Matrix26 Dpose(
const Point2& pn,
double d);
91 static Matrix23 Dpoint(
const Point2& pn,
double d,
const Matrix3& Rt);
147 virtual void print(
const std::string&
s =
"PinholeBase")
const;
189 OptionalJacobian<2, 2> Dpoint = {});
192 std::pair<Point2, bool> projectSafe(
const Point3& pw)
const;
200 {}, OptionalJacobian<2, 3> Dpoint = {})
const;
208 OptionalJacobian<2, 6> Dpose = {},
209 OptionalJacobian<2, 2> Dpoint = {})
const;
213 OptionalJacobian<3, 2> Dpoint = {},
214 OptionalJacobian<3, 1> Ddepth = {});
233 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
235 friend class boost::serialization::access;
236 template<
class Archive>
237 void serialize(Archive & ar,
const unsigned int ) {
238 ar & BOOST_SERIALIZATION_NVP(pose_);
255 inline constexpr
static auto dimension = 6;
287 static CalibratedCamera Level(
const Pose2&
pose2,
double height);
297 static CalibratedCamera Lookat(
const Point3& eye,
const Point3& target,
320 void print(
const std::string&
s =
"CalibratedCamera")
const override {
325 inline size_t dim()
const {
330 inline static size_t Dim() {
343 {}, OptionalJacobian<2, 3> Dpoint = {})
const;
349 OptionalJacobian<3, 1> Dresult_ddepth = {})
const {
352 Matrix31 Dpoint_ddepth;
354 Dresult_dp ? &Dpoint_dpn : 0,
355 Dresult_ddepth ? &Dpoint_ddepth : 0);
357 Matrix33 Dresult_dpoint;
360 Dresult_dp) ? &Dresult_dpoint : 0);
363 *Dresult_dp = Dresult_dpoint * Dpoint_dpn;
365 *Dresult_ddepth = Dresult_dpoint * Dpoint_ddepth;
378 return pose().range(
point, Dcamera, Dpoint);
388 return this->
pose().range(pose, Dcamera, Dpose);
409 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
411 friend class boost::serialization::access;
412 template<
class Archive>
413 void serialize(Archive & ar,
const unsigned int ) {
415 & boost::serialization::make_nvp(
"PinholeBase",
416 boost::serialization::base_object<PinholeBase>(*
this));
431 template <
typename T>
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 set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange[*:*] noreverse nowriteback set trange[*:*] noreverse nowriteback set urange[*:*] noreverse nowriteback set vrange[*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
double range(const CalibratedCamera &camera, OptionalJacobian< 1, 6 > H1={}, OptionalJacobian< 1, 6 > H2={}) const
static Point3 BackprojectFromCamera(const CalibratedCamera &camera, const Point2 &point, const double &depth)
static const Pose3 pose(Rot3(Vector3(1, -1, -1).asDiagonal()), Point3(0, 0, 0.5))
Array< double, 1, 3 > e(1./3., 0.5, 2.)
CalibratedCamera()
default constructor
static const double d[K][N]
Base exception type that uses tbb_allocator if GTSAM is compiled with TBB.
static std::pair< size_t, size_t > translationInterval()
def retract(a, np.ndarray xi)
virtual void print(const std::string &s="PinholeBase") const
print
Both ManifoldTraits and Testable.
double range(const Point3 &point, OptionalJacobian< 1, 6 > Dcamera={}, OptionalJacobian< 1, 3 > Dpoint={}) const
static CalibratedCamera Create(const Pose3 &pose, OptionalJacobian< dimension, 6 > H1={})
Point2_ project2(const Expression< CAMERA > &camera_, const Expression< POINT > &p_)
PinholeBase(const Pose3 &pose)
Constructor with pose.
Pose2_ Expmap(const Vector3_ &xi)
void print(const Matrix &A, const string &s, ostream &stream)
double range(const Pose3 &pose, OptionalJacobian< 1, 6 > Dcamera={}, OptionalJacobian< 1, 6 > Dpose={}) const
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
void print(const std::string &s="CalibratedCamera") const override
print
Pose3 pose_
3D pose of camera
const Point3 & translation(OptionalJacobian< 3, 6 > Hself={}) const
get translation
PinholeBase()
Default constructor.
Key nearbyVariable() const
CalibratedCamera(const Pose3 &pose)
construct with pose
Base class and basic functions for Manifold types.
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
int RealScalar int RealScalar int RealScalar * pc
Pose3_ getPose(const Expression< PinholeCamera< CALIBRATION > > &cam)
const Rot3 & rotation(OptionalJacobian< 3, 6 > Hself={}) const
get rotation
PinholeBase(const Vector &v)
const Point3 & translation() const
get translation
const Pose3 & pose() const
return pose, constant version
Array< int, Dynamic, 1 > v
std::vector< Point2, Eigen::aligned_allocator< Point2 > > Point2Vector
CalibratedCamera(const Vector &v)
construct from vector
static const CalibratedCamera camera(kDefaultPose)
Point2(* Project)(const Point3 &, OptionalJacobian< 2, 3 >)
CheiralityException(Key j)
Point3 backproject(const Point2 &pn, double depth, OptionalJacobian< 3, 6 > Dresult_dpose={}, OptionalJacobian< 3, 2 > Dresult_dp={}, OptionalJacobian< 3, 1 > Dresult_ddepth={}) const
backproject a 2-dimensional point to a 3-dimensional point at given depth
std::uint64_t Key
Integer nonlinear key type.
Point2_ project(const Point3_ &p_cam)
Expression version of PinholeBase::Project.
const Rot3 & rotation() const
get rotation
3D Pose manifold SO(3) x R^3 and group SE(3)
Point2Vector MeasurementVector
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:13