Go to the documentation of this file.
32 template<
typename Calibration>
104 const Point3& upVector,
const Calibration&
K = Calibration()) {
114 *H1 << I_6x6, MatrixK6::Zero();
118 *H2 << Matrix6K::Zero(), MatrixK::Identity();
130 K_ = Calibration(
v.tail<
DimK>());
149 void print(
const std::string&
s =
"PinholeCamera")
const override {
151 K_.print(
s +
".calibration");
170 H->template block<6, 6>(0, 0) = I_6x6;
198 if ((
size_t)
d.size() == 6)
209 d.template tail<DimK>() =
calibration().localCoordinates(
T2.calibration());
227 template<
class POINT>
235 *Dcamera <<
Dpose, Dcal;
264 *Dcamera << Dpose_, Eigen::Matrix<double, 1, DimK>::Zero();
278 *Dcamera << Dpose_, Eigen::Matrix<double, 1, DimK>::Zero();
287 template<
class CalibrationB>
291 Matrix16 Dcamera_, Dother_;
293 Dother ? &Dother_ : 0);
295 *Dcamera << Dcamera_, Eigen::Matrix<double, 1, DimK>::Zero();
299 Dother->template block<1, 6>(0, 0) = Dother_;
327 #if GTSAM_ENABLE_BOOST_SERIALIZATION
329 friend class boost::serialization::access;
330 template<
class Archive>
331 void serialize(Archive & ar,
const unsigned int ) {
333 & boost::serialization::make_nvp(
"PinholeBaseK",
334 boost::serialization::base_object<Base>(*
this));
335 ar & BOOST_SERIALIZATION_NVP(
K_);
345 template <
typename Calibration>
349 template <
typename Calibration>
354 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
constexpr static auto dimension
Dimension depends on calibration.
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 Tue Jan 7 2025 04:03:29