42 #ifndef _STEREO_CALIBRATION_H_
43 #define _STEREO_CALIBRATION_H_
141 void SetDistortionParameters(
float d1_left,
float d2_left,
float d3_left,
float d4_left,
float d1_right,
float d2_right,
float d3_right,
float d4_right);
172 bool LoadCameraParameters(
const char *pCameraParameterFileName,
bool bTransformLeftCameraToIdentity =
true);
375 void TransformLeftCameraToIdentity();
376 void CalculateFundamentalMatrix();
~CStereoCalibration()
The destructor.
const CCalibration * GetRightCalibration() const
Access to the instance of CCalibration for the camera model of the right camera.
bool SaveCameraParameters(const char *pCameraParameterFileName) const
Writes the parameters of the camera model to camera parameter file.
Data structure for the representation of a 2D vector.
void CalculateEpipolarLineInRightImage(const Vec2d &pointInLeftImage, Vec3d &l)
Given an image point in the left image, computes the corresponding epipolar line in the right image...
void Calculate3DPoint(const Vec2d &cameraPointLeft, const Vec2d &cameraPointRight, Vec3d &worldPoint, bool bInputImagesAreRectified, bool bUseDistortionParameters=true, PointPair3d *pConnectionLine=0)
Computes a 3D point, given a point correspondence in both images, by performing stereo triangulation...
bool LoadCameraParameters(const char *pCameraParameterFileName, bool bTransformLeftCameraToIdentity=true)
Initializes the stereo camera model, given a file path to a stereo camera parameter file...
float CalculateEpipolarLineInLeftImageDistance(const Vec2d &pointInLeftImage, const Vec2d &pointInRightImage)
Given a point correspondence, computes the distance from the epipolar line in the left image...
void SetSingleCalibrations(const CCalibration &leftCalibration, const CCalibration &rightCalibration, bool bTransformLeftCameraToIdentity=false)
Initializes the stereo camera model, given two instances of CCalibration.
void SetDistortionParameters(float d1_left, float d2_left, float d3_left, float d4_left, float d1_right, float d2_right, float d3_right, float d4_right)
Sets the distortion parameters of the distortion models of both cameras.
CStereoCalibration()
The default constructor.
void SetExtrinsicParameters(const Mat3d &left_rotation, const Vec3d &left_translation, const Mat3d &right_rotation, const Vec3d &right_translation, bool bTransformLeftCameraToIdentity=false)
Sets the extrinsic parameters of both cameras.
const CCalibration * GetLeftCalibration() const
Access to the instance of CCalibration for the camera model of the left camera.
void Set(const CStereoCalibration &stereoCalibration)
Initializes the stereo camera model, given an instance of CStereoCalibration.
void CalculateEpipolarLineInLeftImage(const Vec2d &pointInRightImage, Vec3d &l)
Given an image point in the right image, computes the corresponding epipolar line in the left image...
Data structure for the representation of a 3D vector.
Camera model parameters and functions for a single camera.
float CalculateEpipolarLineInRightImageDistance(const Vec2d &pointInLeftImage, const Vec2d &pointInRightImage)
Given a point correspondence, computes the distance from the epipolar line in the right image...
Mat3d rectificationHomographyRight
The homography for the rectification mapping of the right image.
int height
The height of the images of the stereo camera system in pixels.
Data structure for the representation of a 3x3 matrix.
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
void GetProjectionMatricesForRectifiedImages(Mat3d &P1Left, Vec3d &p2Left, Mat3d &P1Right, Vec3d &p2Right) const
Sets up the projection matrix P for the rectified images.
Camera model and functions for a stereo camera system.
Mat3d rectificationHomographyLeft
The homography for the rectification mapping of the right image.
int width
The width of the images of the stereo camera system in pixels.