Class CameraModel

Class Documentation

class CameraModel

Virtual camera model for use in simulating a systems view.

Public Functions

virtual ~CameraModel()
void setIntrinsicsFromFocalLength(const Eigen::Matrix<FloatingPoint, 2, 1> &resolution, double focal_length, double min_distance, double max_distance)

Set up the camera model, intrinsics and extrinsics.

void setIntrinsicsFromFoV(double horizontal_fov, double vertical_fov, double min_distance, double max_distance)
void setExtrinsics(const Transformation &T_C_B)
Transformation getCameraPose() const

Get and set the current poses for the camera (should be called after the camera is properly set up).

Transformation getBodyPose() const
void setCameraPose(const Transformation &cam_pose)

Set camera pose actually computes the new bounding plane positions.

void setBodyPose(const Transformation &body_pose)
void getAabb(Point *aabb_min, Point *aabb_max) const

Check whether a point belongs in the current view.

bool isPointInView(const Point &point) const
const AlignedVector<Plane> &getBoundingPlanes() const

Accessor functions for visualization (or other reasons).

Bounding planes are returned in the global coordinate frame.

void getBoundingLines(AlignedVector<Point> *lines) const

Gives all the bounding lines of the planes in connecting order, expressed in the global coordinate frame.

void getFarPlanePoints(AlignedVector<Point> *points) const

Get the 3 points definining the plane at the back (far end) of the camera frustum.

Expressed in global coordinates.