Go to the documentation of this file.
32 template<
typename Calibration>
106 const Point3& upVector,
const Calibration&
K = Calibration()) {
116 *H1 << I_6x6, MatrixK6::Zero();
120 *H2 << Matrix6K::Zero(), MatrixK::Identity();
132 K_ = Calibration(
v.tail<
DimK>());
151 void print(
const std::string&
s =
"PinholeCamera")
const override {
153 K_.print(
s +
".calibration");
172 H->template block<6, 6>(0, 0) = I_6x6;
200 if ((
size_t)
d.size() == 6)
211 d.template tail<DimK>() =
calibration().localCoordinates(
T2.calibration());
229 template<
class POINT>
237 *Dcamera <<
Dpose, Dcal;
266 *Dcamera << Dpose_, Eigen::Matrix<double, 1, DimK>::Zero();
280 *Dcamera << Dpose_, Eigen::Matrix<double, 1, DimK>::Zero();
289 template<
class CalibrationB>
293 Matrix16 Dcamera_, Dother_;
295 Dother ? &Dother_ : 0);
297 *Dcamera << Dcamera_, Eigen::Matrix<double, 1, DimK>::Zero();
301 Dother->template block<1, 6>(0, 0) = Dother_;
329 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
331 friend class boost::serialization::access;
332 template<
class Archive>
333 void serialize(Archive & ar,
const unsigned int ) {
335 & boost::serialization::make_nvp(
"PinholeBaseK",
336 boost::serialization::base_object<Base>(*
this));
337 ar & BOOST_SERIALIZATION_NVP(
K_);
347 template <
typename Calibration>
351 template <
typename Calibration>
356 template <
typename Calibration,
typename T>
Eigen::Matrix< double, dimension, 1 > VectorK6
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
static Matrix23 Dpoint(const Point2 &pn, double d, const Matrix3 &Rt)
static Pose3 LookatPose(const Point3 &eye, const Point3 &target, const Point3 &upVector)
Point2Vector MeasurementVector
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static const double d[K][N]
static PinholeCamera Level(const Calibration &K, const Pose2 &pose2, double height)
Point2 _project2(const POINT &pw, OptionalJacobian< 2, dimension > Dcamera, OptionalJacobian< 2, FixedDimension< POINT >::value > Dpoint) const
Eigen::Matrix< double, 2, DimK > Matrix2K
void print(const std::string &s="PinholeCamera") const override
print
virtual void print(const std::string &s="PinholeBase") const
print
Both ManifoldTraits and Testable.
PinholeCamera(const Vector &v)
Init from vector, can be 6D (default calibration) or dim.
double range(const PinholeCamera< CalibrationB > &camera, OptionalJacobian< 1, dimension > Dcamera={}, OptionalJacobian< 1, 6+CalibrationB::dimension > Dother={}) const
Point2 project2(const Unit3 &pw, OptionalJacobian< 2, dimension > Dcamera={}, OptionalJacobian< 2, 2 > Dpoint={}) const
project a point at infinity from world coordinates into the image
static PinholeCamera Lookat(const Point3 &eye, const Point3 &target, const Point3 &upVector, const Calibration &K=Calibration())
Point2 project(const Point3 &pw, OptionalJacobian< 2, 6 > Dpose={}, OptionalJacobian< 2, 3 > Dpoint={}, OptionalJacobian< 2, DimK > Dcal={}) const
project a 3D point from world coordinates into the image
double range(const Point3 &point, OptionalJacobian< 1, 6 > Hself={}, OptionalJacobian< 1, 3 > Hpoint={}) const
const Calibration & calibration() const override
return calibration
static PinholeCamera Identity()
for Canonical
bool equals(const PinholeBase &camera, double tol=1e-9) const
assert equality up to a tolerance
PinholeBaseK< Calibration > Base
base class has 3D pose as private member
PinholeCamera(const Pose3 &pose, const Calibration &K)
Pose3 inverse() const
inverse transformation with derivatives
PinholeCamera(const Pose3 &pose)
const Pose3 & pose() const
return pose
bool equals(const Base &camera, double tol=1e-9) const
assert equality up to a tolerance
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
~PinholeCamera() override
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type head(NType n)
static PinholeCamera Create(const Pose3 &pose, const Calibration &K, OptionalJacobian< dimension, 6 > H1={}, OptionalJacobian< dimension, DimK > H2={})
TangentVector localCoordinates(const Class &g) const
localCoordinates as required by manifold concept: finds tangent vector between *this and g
Vector defaultErrorWhenTriangulatingBehindCamera() const
for Nonlinear Triangulation
double range(const Pose3 &pose, OptionalJacobian< 1, dimension > Dcamera={}, OptionalJacobian< 1, 6 > Dpose={}) const
double range(const CalibratedCamera &camera, OptionalJacobian< 1, dimension > Dcamera={}, OptionalJacobian< 1, 6 > Dother={}) const
static PinholeCamera Level(const Pose2 &pose2, double height)
PinholeCamera::level with default calibration.
double range(const Point3 &point, OptionalJacobian< 1, dimension > Dcamera={}, OptionalJacobian< 1, 3 > Dpoint={}) const
const Pose3 & getPose(OptionalJacobian< 6, dimension > H) const
return pose, with derivative
PinholeCamera(const Vector &v, const Vector &K)
Init from Vector and calibration.
const Pose3 & pose() const
return pose, constant version
Array< int, Dynamic, 1 > v
std::vector< Point2, Eigen::aligned_allocator< Point2 > > Point2Vector
Point2 project2(const Point3 &pw, OptionalJacobian< 2, dimension > Dcamera={}, OptionalJacobian< 2, 3 > Dpoint={}) const
project a 3D point from world coordinates into the image
VectorK6 localCoordinates(const PinholeCamera &T2) const
return canonical coordinate
The matrix class, also used for vectors and row-vectors.
Calibration K_
Calibration, part of class now.
Give fixed size dimension of a type, fails at compile time if dynamic.
Represents a 3D point on a unit sphere.
static const CalibratedCamera camera(kDefaultPose)
static Matrix26 Dpose(const Point2 &pn, double d)
PinholeCamera retract(const Vector &d) const
move a cameras according to d
static Pose3 LevelPose(const Pose2 &pose2, double height)
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
Pinhole camera with known calibration.
Matrix34 cameraProjectionMatrix() const
for Linear Triangulation
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:03:34