Go to the documentation of this file.
27 Matrix26 PinholeBase::Dpose(
const Point2& pn,
double d) {
29 const double u = pn.x(),
v = pn.y();
30 double uv = u *
v, uu = u * u,
vv =
v *
v;
32 Dpn_pose << uv, -1 - uu,
v, -
d, 0,
d * u, 1 +
vv, -uv, -u, 0, -
d,
d *
v;
37 Matrix23 PinholeBase::Dpoint(
const Point2& pn,
double d,
const Matrix3& Rt) {
39 const double u = pn.x(),
v = pn.y();
42 Rt(0, 0) - u * Rt(2, 0), Rt(0, 1) - u * Rt(2, 1), Rt(0, 2) - u * Rt(2, 2),
43 Rt(1, 0) -
v * Rt(2, 0), Rt(1, 1) -
v * Rt(2, 1), Rt(1, 2) -
v * Rt(2, 2);
51 const Point3 x(st, -ct, 0),
y(0, 0, -1),
z(ct, st, 0);
75 pose_.print(
s +
".pose");
82 H->block(0, 0, 6, 6) = I_6x6;
89 double d = 1.0 /
pc.z();
90 const double u =
pc.x() *
d,
v =
pc.y() *
d;
92 *Dpoint <<
d, 0.0, -u *
d, 0.0,
d, -
v *
d;
102 *Dpoint = Duv_point3 * Dpoint3_pc;
109 pair<Point2, bool> PinholeBase::projectSafe(
const Point3& pw)
const {
112 return make_pair(pn,
pc.z() > 0);
121 #ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION
127 if (Dpose || Dpoint) {
128 const double d = 1.0 /
q.z();
130 *Dpose = PinholeBase::Dpose(pn,
d);
132 *Dpoint = PinholeBase::Dpoint(pn,
d, Rt);
144 const Unit3 pc =
pose().rotation().unrotate(pw, Dpose ? &Dpc_rot : 0,
145 Dpoint ? &Dpc_point : 0);
146 #ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION
147 if (
pc.unitVector().z() <= 0)
159 Dpc_pose.leftCols<3>() = Dpc_rot;
160 *Dpose = Dpn_pc * Dpc_pose;
163 *Dpoint = Dpn_pc * Dpc_point;
172 *Ddepth <<
p.x(),
p.y(), 1;
200 return pose().localCoordinates(
T2.pose());
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
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
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))
static const double d[K][N]
static Point2 project2(const CalibratedCamera &camera, const Point3 &point)
Jet< T, N > sin(const Jet< T, N > &f)
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
def retract(a, np.ndarray xi)
static const VectorValues vv
Calibrated camera for which only pose is unknown.
Jet< T, N > cos(const Jet< T, N > &f)
Point3 cross(const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H1, OptionalJacobian< 3, 3 > H2)
cross product
EIGEN_DEVICE_FUNC const Scalar & q
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
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)
static Point2 project(const Pose3 &pose, const Unit3 &pointAtInfinity, const Cal3_S2::shared_ptr &cal)
Array< int, Dynamic, 1 > v
Represents a 3D point on a unit sphere.
static const CalibratedCamera camera(kDefaultPose)
Point2(* Project)(const Point3 &, OptionalJacobian< 2, 3 >)
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:13