43 #include <visp/vpLine.h>
45 #include <visp/vpDebug.h>
46 #include <visp/vpMath.h>
48 #include <visp/vpFeatureDisplay.h>
99 const double &C1,
const double &D1,
100 const double &A2,
const double &B2,
101 const double &C2,
const double &D2)
174 for (
unsigned int i=0 ; i < 4 ; i++)
247 double A1, A2, B1, B2, C1, C2, D1, D2;
266 printf(
"Degenerate case: the image of the straight line is a point!\n");
272 double theta = atan2( b, a);
369 double a1, a2, b1, b2, c1, c2, d1, d2;
370 double A1, A2, B1, B2, C1, C2, D1, D2;
388 A1 = cMo[0][0]*a1 + cMo[0][1]*b1 + cMo[0][2]*c1;
389 B1 = cMo[1][0]*a1 + cMo[1][1]*b1 + cMo[1][2]*c1;
390 C1 = cMo[2][0]*a1 + cMo[2][1]*b1 + cMo[2][2]*c1;
391 D1 = d1 - (cMo[0][3]*A1 + cMo[1][3]*B1 + cMo[2][3]*C1);
393 A2 = cMo[0][0]*a2 + cMo[0][1]*b2 + cMo[0][2]*c2;
394 B2 = cMo[1][0]*a2 + cMo[1][1]*b2 + cMo[1][2]*c2;
395 C2 = cMo[2][0]*a2 + cMo[2][1]*b2 + cMo[2][2]*c2;
396 D2 = d2 - (cMo[0][3]*A2 + cMo[1][3]*B2 + cMo[2][3]*C2);
417 if (fabs(D2) < fabs(D1))
426 d1 = 1.0/sqrt(a1*a1 + b1*b1 + c1*c1);
439 d1 = 1.0/sqrt(a1*a1 + b1*b1 + c1*c1);
445 D2 /= (A2*a1 + B2*b1 + C2*c1);
510 const unsigned int thickness)
541 const unsigned int thickness)
547 cam, I, color, thickness) ;
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
void setWorldCoordinates(const double &A1, const double &B1, const double &C1, const double &D1, const double &A2, const double &B2, const double &C2, const double &D2)
Class to define colors available for display functionnalities.
error that can be emited by ViSP classes.
Class that defines a line in the object frame, the camera frame and the image plane. All the parameters must be set in meter.
Generic class defining intrinsic camera parameters.
vpLine * duplicate() const
void changeFrame(const vpHomogeneousMatrix &cMo, vpColVector &cP)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
static void displayLine(double rho, double theta, const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1)
void display(const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpColor &color=vpColor::green, const unsigned int thickness=1)
unsigned int getRows() const
Return the number of rows of the matrix.
void resize(const unsigned int i, const bool flagNullify=true)