44 #ifndef _CALIBRATION_H_
45 #define _CALIBRATION_H_
191 float d1,
float d2,
float d3,
float d4,
192 const Mat3d &R,
const Vec3d &t,
int width,
int height);
283 bool LoadCameraParameters(
const char *pCameraParameterFileName,
int nCamera = 0,
bool bSetExtrinsicToIdentity =
false);
459 void CalculateInverseTransformation();
460 void CalculateRadialLensDistortion();
void PrintCameraParameters() const
Prints all camera parameters in the console window (STDOUT).
Data structure for the representation of a 2D vector.
void UndistortImageCoordinates(const Vec2d &distortedImagePoint, Vec2d &undistortedImagePoint) const
Transforms 2D distorted image coordinates to 2D undistorted image coordinates.
void SetCameraParameters(float fx, float fy, float cx, float cy, float d1, float d2, float d3, float d4, const Mat3d &R, const Vec3d &t, int width, int height)
Initializes the camera model, given a complete parameter set.
void CameraToWorldCoordinates(const Vec3d &cameraPoint, Vec3d &worldPoint) const
Transforms 3D camera coordinates to 3D world coordinates.
Vec3d m_translation_inverse
Translation vector of the inverted extrinsic transformation.
void CameraToImageCoordinates(const Vec3d &cameraPoint, Vec2d &imagePoint, bool bUseDistortionParameters=true) const
Transforms 3D camera coordinates to 2D image coordinates.
void ImageToWorldCoordinates(const Vec2d &imagePoint, Vec3d &worldPoint, float zc=1.0f, bool bUseDistortionParameters=true) const
Transforms 2D image coordinates to 3D world coordinates.
CCalibration()
The default constructor.
void GetCameraCoordinates(const Vec3d &worldPoint, Vec2d &imagePoint, bool bUseDistortionParameters=true) const
Deprecated.
bool SaveCameraParameters(const char *pCameraParameterFileName) const
Writes the parameters of the camera model to camera parameter file.
void WorldToImageCoordinates(const Vec3d &worldPoint, Vec2d &imagePoint, bool bUseDistortionParameters=true) const
Transforms 3D world coordinates to 2D image coordinates.
const CCameraParameters & GetCameraParameters() const
Gives access to the camera parameters.
bool LoadCameraParameters(const char *pCameraParameterFileName, int nCamera=0, bool bSetExtrinsicToIdentity=false)
Initializes the camera model, given a file path to a camera parameter file.
Data structure for the representation of a 3D vector.
void DistortCameraCoordinates(const Vec2d &undistortedCameraPoint, Vec2d &distortedCameraPoint) const
Deprecated.
~CCalibration()
The destructor.
void Set(const CCalibration &calibration)
Initializes the camera model, given an instance of CCalibration.
void SetDistortion(float d1, float d2, float d3, float d4)
Sets the distortion parameters of the distortion model.
Camera model parameters and functions for a single camera.
void UndistortCameraCoordinates(const Vec2d &distortedCameraPoint, Vec2d &undistortedCameraPoint) const
Deprecated.
void SetIntrinsicBase(float cx, float cy, float fx, float fy)
Sets the principal point and the focal lengths.
void SetRotation(const Mat3d &R)
Sets the extrinsic parameter R (rotation matrix).
void GetProjectionMatrix(Mat3d &P1, Vec3d &p2) const
Sets up the projection matrix P.
Mat3d m_rotation_inverse
Rotation matrix of the inverted extrinsic transformation.
Data structure for the representation of a 3x3 matrix.
void DistortImageCoordinates(const Vec2d &undistortedImagePoint, Vec2d &distortedImagePoint) const
Transforms 2D undistorted image coordinates to 2D distorted image coordinates.
void SetTranslation(const Vec3d &t)
Sets the extrinsic parameter t (translation vector).
void ImageToCameraCoordinates(const Vec2d &imagePoint, Vec3d &cameraPoint, float zc=1.0f, bool bUseDistortionParameters=true) const
Transforms 2D image coordinates to 3D camera coordinates.
void GetCalibrationMatrix(Mat3d &K) const
Sets up the calibration matrix K.
void WorldToCameraCoordinates(const Vec3d &worldPoint, Vec3d &cameraPoint) const
Transforms 3D world coordinates to 3D camera coordinates.
void GetWorldCoordinates(const Vec2d &imagePoint, Vec3d &worldPoint, float zc=1.0f, bool bUseDistortionParameters=true) const
Deprecated.
Struct containing all parameters of the camera model.