54 pTargetMatrix[0] = sourceMatrix.
r1;
55 pTargetMatrix[1] = sourceMatrix.
r2;
56 pTargetMatrix[2] = sourceMatrix.
r3;
57 pTargetMatrix[3] = sourceMatrix.
r4;
58 pTargetMatrix[4] = sourceMatrix.
r5;
59 pTargetMatrix[5] = sourceMatrix.
r6;
60 pTargetMatrix[6] = sourceMatrix.
r7;
61 pTargetMatrix[7] = sourceMatrix.
r8;
62 pTargetMatrix[8] = sourceMatrix.
r9;
67 pTargetMatrix[0] = sourceMatrix.
r1;
68 pTargetMatrix[1] = sourceMatrix.
r2;
69 pTargetMatrix[2] = sourceMatrix.
r3;
70 pTargetMatrix[3] = sourceMatrix.
r4;
71 pTargetMatrix[4] = sourceMatrix.
r5;
72 pTargetMatrix[5] = sourceMatrix.
r6;
73 pTargetMatrix[6] = sourceMatrix.
r7;
74 pTargetMatrix[7] = sourceMatrix.
r8;
75 pTargetMatrix[8] = sourceMatrix.
r9;
80 pTargetVector[0] = (float) sourceVector.
x;
81 pTargetVector[1] = (
float) sourceVector.
y;
82 pTargetVector[2] = (float) sourceVector.
z;
87 pTargetMatrix[0] = (float) cameraParameters.
focalLength.
x;
91 pTargetMatrix[4] = (float) cameraParameters.
focalLength.
y;
101 CvStereoCamera stereoParams;
102 CvCamera leftCamera, rightCamera;
104 stereoParams.camera[0] = &leftCamera;
105 stereoParams.camera[1] = &rightCamera;
107 stereoParams.camera[0]->imgSize[0] = (float) pStereoCalibration->
width;
108 stereoParams.camera[0]->imgSize[1] = (
float) pStereoCalibration->
height;
109 stereoParams.camera[1]->imgSize[0] = (float) pStereoCalibration->
width;
110 stereoParams.camera[1]->imgSize[1] = (
float) pStereoCalibration->
height;
120 leftCamera.imgSize[0] = (float) leftCameraParameters.
width;
121 leftCamera.imgSize[1] = (
float) leftCameraParameters.
height;
123 for (i = 0; i < 4; i++) leftCamera.distortion[i] = (
float) leftCameraParameters.
distortion[i];
127 rightCamera.imgSize[0] = (float) rightCameraParameters.
width;
128 rightCamera.imgSize[1] = (
float) rightCameraParameters.
height;
130 for (i = 0; i < 4; i++) rightCamera.distortion[i] = (
float) rightCameraParameters.
distortion[i];
134 icvComputeRestStereoParams(&stereoParams);
137 float(stereoParams.coeffs[0][0][0]),
138 float(stereoParams.coeffs[0][0][1]),
139 float(stereoParams.coeffs[0][0][2]),
140 float(stereoParams.coeffs[0][1][0]),
141 float(stereoParams.coeffs[0][1][1]),
142 float(stereoParams.coeffs[0][1][2]),
143 float(stereoParams.coeffs[0][2][0]),
144 float(stereoParams.coeffs[0][2][1]),
145 float(stereoParams.coeffs[0][2][2])
149 float(stereoParams.coeffs[1][0][0]),
150 float(stereoParams.coeffs[1][0][1]),
151 float(stereoParams.coeffs[1][0][2]),
152 float(stereoParams.coeffs[1][1][0]),
153 float(stereoParams.coeffs[1][1][1]),
154 float(stereoParams.coeffs[1][1][2]),
155 float(stereoParams.coeffs[1][2][0]),
156 float(stereoParams.coeffs[1][2][1]),
157 float(stereoParams.coeffs[1][2][2])
Struct containing all parameters of the camera model.
static void FillCalibrationMatrix(float *pTargetMatrix, const CCalibration::CCameraParameters &cameraParameters)
Mat3d m_rotation_inverse
Rotation matrix of the inverted extrinsic transformation.
Mat3d rectificationHomographyRight
The homography for the rectification mapping of the right image.
static void FillMatrix(float *pTargetMatrix, const Mat3d &sourceMatrix)
Data structure for the representation of a 3D vector.
const CCalibration * GetLeftCalibration() const
Access to the instance of CCalibration for the camera model of the left camera.
const CCameraParameters & GetCameraParameters() const
Gives access to the camera parameters.
int height
The height of the images of the stereo camera system in pixels.
int width
The width of the images of the stereo camera system in pixels.
Camera model and functions for a stereo camera system.
Vec3d m_translation_inverse
Translation vector of the inverted extrinsic transformation.
Mat3d rectificationHomographyLeft
The homography for the rectification mapping of the right image.
void CalculateRectificationHomographies(CStereoCalibration *pStereoCalibration)
void SetMat(Mat3d &matrix, float r1, float r2, float r3, float r4, float r5, float r6, float r7, float r8, float r9)
Data structure for the representation of a 3x3 matrix.
const CCalibration * GetRightCalibration() const
Access to the instance of CCalibration for the camera model of the right camera.
static void FillVector(float *pTargetVector, const Vec3d &sourceVector)