GTSAM
4.0.2
C++ library for smoothing and mapping (SAM)
|
#include <CalibratedCamera.h>
Public Types | |
enum | { dimension = 6 } |
typedef Rot3 | Rotation |
typedef Point3 | Translation |
typedef Point2 | Measurement |
typedef Point2Vector | MeasurementVector |
Derivatives | |
static Matrix26 | Dpose (const Point2 &pn, double d) |
static Matrix23 | Dpoint (const Point2 &pn, double d, const Matrix3 &Rt) |
Static functions | |
static Pose3 | LevelPose (const Pose2 &pose2, double height) |
static Pose3 | LookatPose (const Point3 &eye, const Point3 &target, const Point3 &upVector) |
Testable | |
bool | equals (const PinholeBase &camera, double tol=1e-9) const |
assert equality up to a tolerance | |
Standard Interface | |
const Pose3 & | pose () const |
return pose, constant version | |
const Rot3 & | rotation () const |
get rotation | |
const Point3 & | translation () const |
get translation | |
const Pose3 & | getPose (OptionalJacobian< 6, 6 > H) const |
return pose, with derivative | |
Transformations and measurement functions | |
std::pair< Point2, bool > | projectSafe (const Point3 &pw) const |
Project a point into the image and check depth. | |
Point2 | project2 (const Point3 &point, OptionalJacobian< 2, 6 > Dpose={}, OptionalJacobian< 2, 3 > Dpoint={}) const |
Point2 | project2 (const Unit3 &point, OptionalJacobian< 2, 6 > Dpose={}, OptionalJacobian< 2, 2 > Dpoint={}) const |
static Point2 | Project (const Point3 &pc, OptionalJacobian< 2, 3 > Dpoint={}) |
static Point2 | Project (const Unit3 &pc, OptionalJacobian< 2, 2 > Dpoint={}) |
static Point3 | BackprojectFromCamera (const Point2 &p, const double depth, OptionalJacobian< 3, 2 > Dpoint={}, OptionalJacobian< 3, 1 > Ddepth={}) |
backproject a 2-dimensional point to a 3-dimensional point at given depth | |
Advanced interface | |
static std::pair< size_t, size_t > | translationInterval () |
Standard Constructors | |
CalibratedCamera () | |
default constructor | |
CalibratedCamera (const Pose3 &pose) | |
construct with pose | |
Named Constructors | |
static CalibratedCamera | Create (const Pose3 &pose, OptionalJacobian< dimension, 6 > H1={}) |
static CalibratedCamera | Level (const Pose2 &pose2, double height) |
static CalibratedCamera | Lookat (const Point3 &eye, const Point3 &target, const Point3 &upVector) |
Advanced Constructors | |
CalibratedCamera (const Vector &v) | |
construct from vector | |
Manifold | |
CalibratedCamera | retract (const Vector &d) const |
move a cameras pose according to d | |
Vector | localCoordinates (const CalibratedCamera &T2) const |
Return canonical coordinate. | |
void | print (const std::string &s="CalibratedCamera") const override |
print | |
size_t | dim () const |
static size_t | Dim () |
Transformations and measurement functions | |
Point2 | project (const Point3 &point, OptionalJacobian< 2, 6 > Dcamera={}, OptionalJacobian< 2, 3 > Dpoint={}) const |
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 | |
double | range (const Point3 &point, OptionalJacobian< 1, 6 > Dcamera={}, OptionalJacobian< 1, 3 > Dpoint={}) const |
double | range (const Pose3 &pose, OptionalJacobian< 1, 6 > Dcamera={}, OptionalJacobian< 1, 6 > Dpose={}) const |
double | range (const CalibratedCamera &camera, OptionalJacobian< 1, 6 > H1={}, OptionalJacobian< 1, 6 > H2={}) const |
A Calibrated camera class [R|-R't], calibration K=I. If calibration is known, it is more computationally efficient to calibrate the measurements rather than try to predict in pixels.
|
inherited |
Some classes template on either PinholeCamera or StereoCamera, and this typedef informs those classes what "project" returns.
|
inherited |
Pose Concept requirements
|
inline |
|
inlinestatic |
|
staticprotectedinherited |
Calculate Jacobian with respect to point
pn | projection in normalized coordinates |
d | disparity (inverse depth) |
Rt | transposed rotation matrix |
|
staticprotectedinherited |
Calculate Jacobian with respect to pose
pn | projection in normalized coordinates |
d | disparity (inverse depth) |
|
static |
Create a level camera at the given 2D pose and height
pose2 | specifies the location and viewing direction |
height | specifies the height of the camera (along the positive Z-axis) (theta 0 = looking in direction of positive X axis) |
Create a level pose at the given 2D pose and height
K | the calibration |
pose2 | specifies the location and viewing direction (theta 0 = looking in direction of positive X axis) |
height | camera height |
|
static |
Create a camera at the given eye position looking at a target point in the scene with the specified up direction vector.
eye | specifies the camera position |
target | the point to look at |
upVector | specifies the camera up direction vector, doesn't need to be on the image plane nor orthogonal to the viewing axis |
|
staticinherited |
Create a camera pose at the given eye position looking at a target point in the scene with the specified up direction vector.
eye | specifies the camera position |
target | the point to look at |
upVector | specifies the camera up direction vector, doesn't need to be on the image plane nor orthogonal to the viewing axis |
|
staticinherited |
Project from 3D point in camera coordinates into image Does not throw a CheiralityException, even if pc behind image plane
pc | point in camera coordinates |
|
staticinherited |
Project from 3D point at infinity in camera coordinates into image Does not throw a CheiralityException, even if pc behind image plane
pc | point in camera coordinates |
Point2 gtsam::CalibratedCamera::project | ( | const Point3 & | point, |
OptionalJacobian< 2, 6 > | Dcamera = {} , |
||
OptionalJacobian< 2, 3 > | Dpoint = {} |
||
) | const |
|
inherited |
Project point into the image Throws a CheiralityException if point behind image plane iff GTSAM_THROW_CHEIRALITY_EXCEPTION
point | 3D point in world coordinates |
|
inherited |
Project point at infinity into the image Throws a CheiralityException if point behind image plane iff GTSAM_THROW_CHEIRALITY_EXCEPTION
point | 3D point in world coordinates |
|
inline |
Calculate range to a landmark
point | 3D location of landmark |
|
inline |
Calculate range to another pose
pose | Other SO(3) pose |
|
inline |
Calculate range to another camera
camera | Other camera |
|
inlinestaticinherited |
Return the start and end indices (inclusive) of the translation component of the exponential map parameterization