26 #include "ProjectionError.hh"
37 this->baseline = baseline;
39 cam[Left].SetSimplePerspective(0.87, res, res);
40 cam[Right].SetSimplePerspective(0.87, res, res);
57 baseline = tan(angle) * depth;
65 vector<Vector3<double> > ray(2);
67 prj = cam[Right].Project(p);
73 cam[Right].UnProjectToRay(prj, pos, ray[Right]);
98 for (
int i = 0; i < 3; i++)
100 c[i][Left] = ray[Left][i];
101 c[i][Right] = -ray[Right][i];
109 double t = result[0];
113 double diff = prjp.
Length();
121 if (cam.size() > (
unsigned int)which && which >= 0)
void Init(int res, double depth, double angle)
Initiates cameras and calculates the length of the baseline based on minDepth and angle...
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates.
void SetXYZ(ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY, ROTATION_MATRIX_TYPE PhiZ)
Set Euler angles (in rad) in order XYZ.
computes and holds the singular value decomposition of a rectangular (not necessarily quadratic) Matr...
double Length() const
returns the Euclidean Length of the Vector
double GetBaseline() const
camera parameters which define the mapping between rays in the camera coordinate system and pixels in...
double ComputeDiff(double z, double offset)
bool IsAtInfinity() const
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates.
const ProjectionParametersPerspective * GetCam(ELeftRight which)
Matrix< double > Invert()
returns pseudoinverse of A = U * S * V^T A^+ = V * S^+ * U^T
void SetIdentity()
set the elements of this matrix to the identity matrix (possibly overriding the inherited method) ...