NDEVR
API Documentation
GeometricCameraabstract

Abstract interface for geometric camera models (pinhole, fisheye, etc.). More...

Collaboration diagram for GeometricCamera:
[legend]

Public Member Functions

 GeometricCamera ()
 Default constructor.
 GeometricCamera (const Buffer< float > &_vParameters)
 Constructs with the given intrinsic parameters.
virtual bool epipolarConstrain (GeometricCamera *otherCamera, const cv::KeyPoint &kp1, const cv::KeyPoint &kp2, const Eigen::Matrix3f &R12, const Eigen::Vector3f &t12, const float sigmaLevel, const float unc)=0
 Checks whether two keypoints satisfy the epipolar constraint.
uint04 GetId ()
 Returns the unique camera id.
float getParameter (const int i)
 Returns the i-th intrinsic parameter.
virtual bool isEqual (const GeometricCamera *pCam) const =0
 Checks equality with another camera model.
virtual cv::Point2f project (const cv::Point3f &p3D)=0
 Projects a 3D point to 2D image coordinates (cv::Point3f overload).
virtual Eigen::Vector2d project (const Eigen::Vector3d &v3D)=0
 Projects a 3D point to 2D image coordinates (double precision).
virtual Eigen::Vector2f project (const Eigen::Vector3f &v3D)=0
 Projects a 3D point to 2D image coordinates (single precision).
virtual Eigen::Matrix< g_type, 2, 3 > projectJac (const Eigen::Vector3< g_type > &v3D)=0
 Computes the 2x3 Jacobian of the projection function.
virtual Eigen::Vector2f projectMat (const cv::Point3f &p3D)=0
 Projects a cv::Point3f to 2D and returns as Eigen vector.
void setParameter (const float p, const uint04 i)
 Sets the i-th intrinsic parameter.
uint04 size () const
 Returns the number of intrinsic parameters.
virtual cv::Mat toK ()=0
 Returns the camera calibration matrix as a cv::Mat.
virtual Eigen::Matrix3f toK_ ()=0
 Returns the camera calibration matrix as an Eigen matrix.
uint04 type () const
 Returns the camera type (CAM_PINHOLE or CAM_FISHEYE).
virtual float uncertainty2 (const Eigen::Matrix< g_type, 2, 1 > &p2D)=0
 Computes the squared uncertainty at a 2D image point.
virtual cv::Point3f unproject (const cv::Point2f &p2D)=0
 Unprojects a 2D point to a 3D point.
virtual Eigen::Vector3f unprojectEig (const cv::Point2f &p2D)=0
 Unprojects a 2D point to a 3D ray as an Eigen vector.

Static Public Attributes

static constexpr uint04 CAM_FISHEYE = 1
 Fisheye camera type identifier.
static constexpr uint04 CAM_PINHOLE = 0
 Pinhole camera type identifier.
static uint04 nNextId
 Global counter for assigning unique camera IDs.

Protected Attributes

uint04 mnId = Constant<uint04>::Invalid
 Unique camera identifier.
uint04 mnType = Constant<uint04>::Invalid
 Camera model type.
Buffer< float > mvParameters
 Camera intrinsic parameters.

Detailed Description

Abstract interface for geometric camera models (pinhole, fisheye, etc.).

Definition at line 25 of file GeometricCamera.h.

Constructor & Destructor Documentation

◆ GeometricCamera()

GeometricCamera::GeometricCamera ( const Buffer< float > & _vParameters)
inline

Constructs with the given intrinsic parameters.

Parameters
[in]_vParametersThe camera intrinsic parameters.

Definition at line 32 of file GeometricCamera.h.

References mvParameters.

Member Function Documentation

◆ epipolarConstrain()

virtual bool GeometricCamera::epipolarConstrain ( GeometricCamera * otherCamera,
const cv::KeyPoint & kp1,
const cv::KeyPoint & kp2,
const Eigen::Matrix3f & R12,
const Eigen::Vector3f & t12,
const float sigmaLevel,
const float unc )
pure virtual

Checks whether two keypoints satisfy the epipolar constraint.

Parameters
[in]otherCameraThe other camera model.
[in]kp1Keypoint in the first image.
[in]kp2Keypoint in the second image.
[in]R12Relative rotation from camera 1 to camera 2.
[in]t12Relative translation from camera 1 to camera 2.
[in]sigmaLevelThe scale sigma level.
[in]uncThe uncertainty threshold.
Returns
True if the constraint is satisfied.

References GeometricCamera().

◆ projectJac()

virtual Eigen::Matrix< g_type, 2, 3 > GeometricCamera::projectJac ( const Eigen::Vector3< g_type > & v3D)
pure virtual

Computes the 2x3 Jacobian of the projection function.

Parameters
[in]v3DThe 3D point at which to evaluate the Jacobian.

◆ uncertainty2()

virtual float GeometricCamera::uncertainty2 ( const Eigen::Matrix< g_type, 2, 1 > & p2D)
pure virtual

Computes the squared uncertainty at a 2D image point.

Parameters
[in]p2DThe 2D image point.

The documentation for this class was generated from the following file: