45 #include <visp3/visual_features/vpFeatureBuilder.h>
46 #include <visp3/core/vpMath.h>
67 if (fabs(t.
cP[3]) > fabs(t.
cP[7]))
115 double a = t.
getA() ;
116 double b = t.
getB() ;
117 double c = t.
getC() ;
119 double x0 = t.
getX() ;
120 double y0 = t.
getY() ;
121 double z0 = t.
getZ() ;
123 double R = t.
getR() ;
130 double alpha1 = (1 - a*a)*x0 - a*b*y0 - a*c*z0;
131 double beta1 = -a*b*x0 + (1 - b*b)*y0 - b*c*z0;
132 double gamma1 = -a*c*x0 - b*c*y0 + (1 - c*c)*z0;
144 s.
setABCD(alpha1,beta1,gamma1,D) ;
166 #ifdef VISP_HAVE_MODULE_ME
216 double rhop = t.
getRho() ;
222 if (thetap >= 0 && thetap < M_PI/2)
224 thetap = M_PI/2 - thetap;
227 else if (thetap >= M_PI/2 && thetap < 3*M_PI/2)
229 thetap = 3*M_PI/2 + M_PI - thetap;
232 else if (thetap >= 3*M_PI/2 && thetap <= 2*M_PI)
234 thetap = M_PI/2 + 2*M_PI - thetap;
243 while (theta > M_PI) { theta -= 2*M_PI ; }
244 while (theta < -M_PI) { theta += 2*M_PI ; }
276 #endif //#ifdef VISP_HAVE_MODULE_ME
void setABCD(const double A, const double B, const double C, const double D)
void buildFrom(const double rho, const double theta)
Class that defines a line in the object frame, the camera frame and the image plane. All the parameters must be set in meter.
static double sqr(double x)
Class that tracks in an image a line moving edges.
Generic class defining intrinsic camera parameters.
Class that defines a 2D line visual feature which is composed by two parameters that are and ...
Class that defines what is a cylinder.
static void convertLine(const vpCameraParameters &cam, const double &rho_p, const double &theta_p, double &rho_m, double &theta_m)
line coordinates conversion (rho,theta)
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
void setRhoTheta(const double rho, const double theta)